Tag Archives: ‘utf-8’ codec can’t decode byte 0xd4 in position 1

[Solved] ‘utf-8’ codec can’t decode byte 0xd4 in position 1,invalid continuation byte

Error while reading file. This is an encoding problem that python is very prone to encounter when reading files. The solution is to add encoding=’ISO-8859-1′.

 

 

 

 

Since the default ftp download is ascii mode, the downloaded file encoding is iso8859-1.