0
f = open(path,'r',encoding='utf8')

This is the code I'm trying to run but it outputs 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte as the error. What might be the reason for this?

khelwood
  • 55,782
  • 14
  • 81
  • 108
Jayakrishnan
  • 563
  • 5
  • 13

1 Answers1

1

Try changing your encoding to utf-8, and see if that fixes it. Otherwise, the file might not be encoded in utf-8.

Daniil Rose
  • 123
  • 1
  • 9