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
  • 52,115
  • 13
  • 74
  • 94
Jayakrishnan
  • 367
  • 3
  • 11

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
  • 2
  • 8