Reputation: 671
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?
Upvotes: 0
Views: 108
Reputation: 123
Try changing your encoding to utf-8, and see if that fixes it. Otherwise, the file might not be encoded in utf-8.
Upvotes: 1