#63 UnboundLocalError in rmdSimple.py


When running gtk-recordMyDesktop I receive the following error:

Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/recordMyDesktop/rmdSimple.py", line 250, in __select_window__
if wid: xwininfo_com = ['xwininfo','-id',wid]
UnboundLocalError: local variable 'wid' referenced before assignment

A quick peek at that file and you see that the variable "wid" is only assigned inside an if block, so if the test fails then the variable is left uninitialized.

I've attached quite possibly the smallest of patches to fix the issue. There may be a preferred way to do this initialization, but I did it above the outermost if so that wid will always be bound.


  • Doug Van Horn

    Doug Van Horn - 2010-06-29

    Patch the rmdSimple.py file in the gtk module.

  • Doug Van Horn

    Doug Van Horn - 2010-06-29

    FYI, this problem caused the "Select Window" functionality to not work at all. Adding this fix brought the feature back to life.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks