pycharm UnicodeDecodeError: ‘utf-8‘ codec can‘t decode bytes in position 1022-1023: unexpected end o
·
pycharm debug 的时候总是报错:
File "C:\\plugins\python\helpers\pydev\_pydevd_bundle\pydevd_comm.py", line 301, in _on_run
r = r.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 1022-1023: unexpected end of data
修改为:
#Note: the java backend is always expected to pass utf-8 encoded strings. We now work with unicode
#internally and thus, we may need to convert to the actual encoding where needed (i.e.: filenames
#on python 2 may need to be converted to the filesystem encoding).
if hasattr(r, 'decode'):
# r = r.decode('utf-8')
r = r.decode('utf-8','ignore')
更多推荐



所有评论(0)