Hello pudb people!
I'm trying my hand on pudb. (OSX 10.9.2, brewed Python 3.3.4, pudb 2013.5.1
installed with pip3). I run into a weird exception that I've been able to
isolate to this case:
I have a file “test.py” in UTF-8 encoding (three lines):
#! /usr/local/bin/python3
import os
"øø"
When I run "pudb test.py” it produces this exception immediately:
Traceback (most recent call last):
File "/usr/local/lib/python3.3/site-packages/pudb/__init__.py", line 73, in
runscript
dbg._runscript(mainpyfile)
File "/usr/local/lib/python3.3/site-packages/pudb/debugger.py", line 370,
in _runscript
self.run(statement, globals=globals_, locals=locals_)
File
"/usr/local/Cellar/python3/3.3.4/Frameworks/Python.framework/Versions/3.3/ \
lib/python3.3/bdb.py",
line 405, in run
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
File "./test.py", line 2, in <module>
import os
File "./test.py", line 2, in <module>
import os
File
"/usr/local/Cellar/python3/3.3.4/Frameworks/Python.framework/Versions/3.3/ \
lib/python3.3/bdb.py",
line 47, in trace_dispatch
return self.dispatch_line(frame)
File
"/usr/local/Cellar/python3/3.3.4/Frameworks/Python.framework/Versions/3.3/ \
lib/python3.3/bdb.py",
line 65, in dispatch_line
self.user_line(frame)
File "/usr/local/lib/python3.3/site-packages/pudb/debugger.py", line 322,
in user_line
self.interaction(frame)
File "/usr/local/lib/python3.3/site-packages/pudb/debugger.py", line 290,
in interaction
show_exc_dialog=show_exc_dialog)
File "/usr/local/lib/python3.3/site-packages/pudb/debugger.py", line 1841,
in call_with_ui
return f(*args, **kwargs)
File "/usr/local/lib/python3.3/site-packages/pudb/debugger.py", line 2024,
in interaction
self.event_loop()
File "/usr/local/lib/python3.3/site-packages/pudb/debugger.py", line 1983,
in event_loop
self.screen.draw_screen(self.size, canvas)
File "/usr/local/lib/python3.3/site-packages/urwid/raw_display.py", line
769, in draw_screen
l = l.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 3:
unexpected end of data
If I remove the import statement or one of the ø's, there’s no exception thrown.
Any thoughts?
/Morten
_______________________________________________
Pudb mailing list
[email protected]
http://lists.tiker.net/listinfo/pudb