global name Status Icon is undefined

Bug #137165 reported by Paul Hoch
10
Affects Status Importance Assigned to Milestone
Weather wallpaper
Fix Committed
Low
Raúl González Duque

Bug Description

When running the new version I get the following message and it does not refresh:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "threading.py", line 460, in __bootstrap
    self.run()
  File "/usr/bin/weather-wallpaper", line 254, in run
    statusIcon.set_from_stock(gtk.STOCK_REFRESH)
NameError: global name 'statusIcon' is not defined

Revision history for this message
Nate Walker (kiwinewt) wrote :

I also get the same. I think it is because the statusIcon = gtk.StatusIcon() is in a try block, and may not be being called?

It can be fixed by changing lines 558-566 to:

statusIcon = gtk.StatusIcon()
try:
    # Run the thread which updates the wallpaper
    updater = Updater()
    updater.start()

    # Create the status icon
    statusIcon.set_from_stock(gtk.STOCK_REFRESH)
    menu = gtk.Menu()

Revision history for this message
Paul Hoch (paulbhoch) wrote :

That seems to work for me. Thanks!

Revision history for this message
Maxxer (lorenzo-milesi) wrote :

works for me too! thanks!

Revision history for this message
Raúl González Duque (zootropo) wrote :

Ouch!

Changed in weather-wallpaper:
assignee: nobody → zootropo
importance: Undecided → Low
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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