Posts

Showing posts from April, 2017

'ascii' codec can't decode byte 0xe2 in position 50: ordinal not in range(128)

Image
Disclaimer: I'm not a python developer :) Yesterday I've found a tool that I needed, it was written in python. Nothing special, get a list of links from a csv, login to a page, and access a link from the opened page by match. The script was old(2 years), and it needed some refinement, but I managed to make it work to start griding my over 7000 links, after 30 minutes later I saw it crashed with a strange error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 50: ordinal not in range(128) I've started to investigate the issue, found some information on stackoverflow, but I was confused, I don't really know python that well. What I've found is to make some changes in the config files from python, which I don't really know how to do and it was not recommended, or to use decode('utf-8') function on the string variable and usage that caused the issue. As you can see in the full error log, listed down below, I tra