iotop crashes with UnboundLocalError

Bug #785390 reported by Gavin Bisesi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python2.6 (Debian)
Fix Released
Unknown
python2.6 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: iotop

Immediately after installing iotop on Ubuntu Karmic, it crashes.

root@player:~# apt-get install iotop
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  iotop
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 21.4kB of archives.
After this operation, 164kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com karmic/universe iotop 0.3-1 [21.4kB]
Fetched 21.4kB in 0s (55.7kB/s)
Selecting previously deselected package iotop.
(Reading database ... 81004 files and directories currently installed.)
Unpacking iotop (from .../archives/iotop_0.3-1_all.deb) ...
Setting up iotop (0.3-1) ...

Processing triggers for python-support ...
root@player:~# iotop
Traceback (most recent call last):
  File "/usr/bin/iotop", line 16, in <module>
    main()
  File "/usr/lib/pymodules/python2.6/iotop/ui.py", line 361, in main
    main_loop()
  File "/usr/lib/pymodules/python2.6/iotop/ui.py", line 351, in <lambda>
    main_loop = lambda: run_iotop(options)
  File "/usr/lib/pymodules/python2.6/iotop/ui.py", line 267, in run_iotop
    return curses.wrapper(run_iotop_window, options)
  File "/usr/lib/python2.6/curses/wrapper.py", line 47, in wrapper
    stdscr.keypad(0)
UnboundLocalError: local variable 'stdscr' referenced before assignment

description: updated
Revision history for this message
Paul Wise (Debian) (pabs) wrote :

Please upgrade to a newer version of iotop and try again.

Revision history for this message
Gavin Bisesi (gavin-bisesi) wrote :

0.3-1 appears to be the latest version in Karmic.

Revision history for this message
Paul Wise (Debian) (pabs) wrote :

Then ask for a backport and try that:

https://wiki.ubuntu.com/UbuntuBackports

Revision history for this message
Paul Wise (Debian) (pabs) wrote :

An update:

Looking at the code, it is a bug in the Python curses wrapper, that is fixed in python 2.7:

http://bugs.python.org/issue5622

As a workaround until this is fixed or Ubuntu switches to python 2.7, please install python2.7 and run iotop like this:

python2.7 /usr/bin/iotop

Does that work for you or is there some other error?

Revision history for this message
Paul Wise (Debian) (pabs) wrote :

It was confirmed that upgrading to python2.7 prevents the issue.

affects: iotop (Ubuntu) → python2.6 (Ubuntu)
affects: iotop (Debian) → python2.6 (Debian)
Changed in python2.6 (Debian):
status: Unknown → Confirmed
Changed in python2.6 (Debian):
status: Confirmed → Fix Released
Revision history for this message
dino99 (9d9) wrote :

Support for this version has ended

Changed in python2.6 (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.