insidesherpa / JPMC-tech-task-1-PY3

50 stars 447 forks source link

server3.py (utf-8 code can't decode byte 0xd6 in position 2: invalid continuation byte) #151

Open Vincent-Quant opened 4 years ago

Vincent-Quant commented 4 years ago

Trouble

I would like to run server3.py, but cannot continue on my task. My system is Windows 10 (x64), and I am using python from Anaconda Navigator (The path is set up). I have checked that my python version is 3.7.6, and I sometimes I also encountered this issue when I use pd.read_csv code, but I'm not sure which part of the code of server3.py has anything to do with the problem. Please help me, thanks!

iriyagupta commented 4 years ago

Is this still an issue or has been resolved?

Vincent-Quant commented 4 years ago

It still hasn't been resolved yet. I actually got stuck after confronted with this problem.

iriyagupta commented 4 years ago

Does your client3.py file run without any error?

Vincent-Quant commented 4 years ago

No, I can not run it because I guess I am not able to use it without server3.py?

Translation from the last line: Fail to connect, because the target computer refuse to make connection.

clientpy

iriyagupta commented 4 years ago

Try changing the code where json loads in client3.py to :

quotes = json.loads(urllib.request.urlopen(QUERY.format(random.random())).read().decode("utf-8"))

I am hoping the code will work after this.

Vincent-Quant commented 4 years ago

The above code doesn't work, but I have finally found the issue of error! It was due to the fact that the name of my computer wasn't in English, causing some error in character encoding. Anyway, still very much appreciate your kindly assistance!