To Fix UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 10: invalid continuation byte Error just Check the file. Here you have to check if you're manipulating a file that was just opened in 'rb' mode. Just make sure about it.