I have a program that is communicating with another machine that sends (or is supposed to send) ASCII characters, the code below is how I write and read code to the machine. def writeCode(send): address = ‘COM4’ I get the error on the “out+=ser.read(1).decode(‘ascii’) line. I looked online but most of the advice seems to be based around if you
Tag: decoding
UnicodeDecodeError when try to read data from ‘google.com’ in Python
I’m starting to learn about reading data from a website. But when I try to read data from google.com I encounter this error: Below are my code (extractly as the instruction video, only different website): What is wrong? Thanks in advance Answer Specifing the encoding and error handling should solve the problem: When you are learning web scraping with python