[issue22009] pdb.set_trace() crashes with UnicodeDecodeError when binary data is input via stdin

Silverback Networks report at bugs.python.org
Sat Jul 19 04:54:26 CEST 2014


Silverback Networks added the comment:

OK, now that I've screwed my thinking cap back on, it's obvious that pdb in the example is pulling from stdin. However, that isn't be the case in my original problem, so modify the example to:

sample.py:
import sys, pdb
infile = sys.stdin.buffer.read()
pdb.set_trace()

Same error despite nothing being left in stdin's buffer.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22009>
_______________________________________


More information about the Python-bugs-list mailing list