[issue24159] Misleading TypeError when pickling bytes to a file opened as text

Борис Верховский report at bugs.python.org
Fri Nov 1 09:38:36 EDT 2019


Борис Верховский <boris.verk at gmail.com> added the comment:

As I said in issue38226, the error message you get when you try to pickle.load() a file opened in "r" mode instead of "rb" mode,

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte

is also confusing and can be improved.

----------
nosy: +boris

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24159>
_______________________________________


More information about the Python-bugs-list mailing list