Image or File Option Window Crash

Bug #1064649 reported by Austin Bowen on 2012-10-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I have Screenlets v0.1.5 on Debian 6. When changing an image/file option with a screenlet's properties window, when the file selection window pops up and if no file is given and you press Enter (NOT pressing the Open button) in the empty text field, the file selection window crashes with the following error:

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/screenlets/options/", line 159, in but_callback
TypeError: Gtk.Entry.set_text() argument 1 must be string, not None

This error is avoided by pressing the Open button with an empty text field, however.

The Properties window and the screenlet are still responsive, but the file selection window won't close until the screenlet closes. It's a minor bug really, and I fixed it by replacing line 159 in screenlets/options/


With the following 3 lines:

fn = dlg.get_filename()
if not fn: fn = ""

That fixed the problem, and it clears the string if None is given. An alternative would also be to only set the string if the filename is not None:

fn = dlg.get_filename()
if (fn != None): self._entry.set_text(fn)

A minor bug, but easy to fix.

Related branches

Austin Bowen (austin-bowen-314) wrote :
Märt Põder (boamaod) on 2012-10-10
Changed in screenlets:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers