`iotop` fails with python error "UnboundLocalError: local variable 'stdscr' referenced before assignment"

Solution Unverified - Updated -

Issue

  • When using iotop from a remote system it fails with an error in python
  • Error message UnboundLocalError: local variable 'stdscr' referenced before assignment when using python based programs
  • Full error message:
[root@server root]# iotop
Traceback (most recent call last):
  File "/usr/sbin/iotop", line 16, in <module>
    main()
  File "/usr/lib/python2.6/site-packages/iotop/ui.py", line 559, in main
    main_loop()
  File "/usr/lib/python2.6/site-packages/iotop/ui.py", line 549, in <lambda>
    main_loop = lambda: run_iotop(options)
  File "/usr/lib/python2.6/site-packages/iotop/ui.py", line 447, in run_iotop
    return curses.wrapper(run_iotop_window, options)
  File "/usr/lib64/python2.6/curses/wrapper.py", line 46, in wrapper
    stdscr.keypad(0)
UnboundLocalError: local variable 'stdscr' referenced before assignment

Environment

  • Red Hat Enterprise Linux 5.x
  • Red Hat Enterprise Linux 6.x
  • Red Hat Enterprise Linux 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.