Anyone who knows python codec. Im seeing some weird behaviour and would love to know the reason
Here are my logs:
your_program] File is empty 'utf-8' codec can't decode byte 0xfa in position 9: invalid start byte
And here’s a snippet of my code:
self.file_byte_data_as_string = str(self.file_byte_data, 'utf-8')
It doesnt let me decode to utf-8 when I try to convert the file byte array directly but if i do this
header = str(self.file_byte_data[:5],'utf-8')
it works perfectly fine and i get a string.