Debug exception in Pychrom, but no exception at run time

1. Environment: Python3.5
2. "- sharp--coding: UTF-8- -"
3, question:
Connected to pydev debugger (build 182.4129.34)
Traceback (most recent call last):
File "D:JetBrainsPyCharm Community Edition 2018.2.2helperspydev_pydevd_bundlepydevd_comm.py", line 382, in _ on_run

have been added to the top of the code.
r = r.decode("utf-8")

UnicodeDecodeError: "utf-8" codec can"t decode bytes in position 1022-1023: unexpected end of data

Jan.08,2022

because the string of Python3 has no decode () method, you need to encode () before decode (). For example, r=r.encode (XXX) .decode (XXX)

Menu