arghblargh / QueueBot

Queue management bot for Twitch.tv chat
4 stars 1 forks source link

ASCII codec failed. #5

Closed kyroskoh closed 9 years ago

kyroskoh commented 9 years ago

Traceback (most recent call last): File "QueueBot.py", line 433, in main() File "QueueBot.py", line 209, in main readbuffer += s.recv(1024).decode() UnicodeDecodeError: 'ascii' codec can't decode byte 0xeb in position 60: ordinal not in range(128)

kyroskoh commented 9 years ago

Then, I have edit the code:

            # Receive data from IRC and spitting it into lines.
            readbuffer += s.recv(1024).decode()

to:

            # Receive data from IRC and spitting it into lines.
            readbuffer += s.recv(1024).decode('utf-8', 'ignore')

It looks fine for time being... Still monitoring...