UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xb0 in position 12: invalid start byte [Troubleshooting : Python]

Spread the word!

ERROR:

This kind of error happens because of the text encoding. It could be raised by special characters inside the text to be read.

HOW TO SOLVE IT:

Old code:

To solve this error, we can first detect the text encoding and than use it later. New code:

[Source here]

Be the first to comment

Leave a Reply

Your email address will not be published.


*