Hi,
I just ran into this issue and Google led me to debian bug #708252. The problem
likely was with a video file whose file name contained an Umlaut (ö).
I sudoedit-ed the patch[0] into my iotop installation to test it. The result
didn't look pretty:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position
137: ordinal not in range(128)
Traceback (most recent call last):
File "/usr/sbin/iotop", line 17, in <module>
main()
File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 616, in main
main_loop()
File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 606, in <lambda>
main_loop = lambda: run_iotop(options)
File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 504, in run_iotop
return curses.wrapper(run_iotop_window, options)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 497, in
run_iotop_window
ui.run()
File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 155, in run
self.process_list.duration)
File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 477, in
refresh_display
print_line(lines[i].encode('utf-8'))
File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 473, in print_line
self.win.addstr(i + len(summary) + 1, 0, lines[i])
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position
137: ordinal not in range(128)
Notice that there is a new call to print_line() from line 477. So this caught
the original UnicodeEncodeError and the print_line(lines[i].encode('utf-8'))
then caused the same error again.
Since there doesn't seem to be an easy test case for this yet, the following
triggers this problem reliably for me:
$ dd if=/dev/zero of=öäü߀
Cheers,
Uli
[0]:
http://repo.or.cz/w/iotop.git/commitdiff/b3a739757b0c6246514e6ebc9bc02961bfa9ad15
--
Bruce Schneier can read and understand Perl programs.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]