SlideshowScreenlet crash on TypeError: integer argument expected, got float

Bug #701199 reported by Julien Lavergne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Individual Screenlets
Fix Released
Medium
Unassigned

Bug Description

SlideshowScreenlet crash on startup.

Ubuntu natty
Screenlets version : 0.1.3~bzr592+20110109213652~natty1
Screenlets-pack-all: 0.0.1~bzr738+20110109231342~natty1

REGISTER screenlet: SlideshowScreenlet
True
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/screenlets/__init__.py", line 1934, in expose
    self.on_draw(ctx)
  File "/usr/share/screenlets/screenlets-pack-all/Slideshow/SlideshowScreenlet.py", line 779, in on_draw
    scaled_image_y)
  File "/usr/lib/pymodules/python2.7/screenlets/drawing.py", line 464, in draw_scaled_image
    pixbuf = gtk.gdk.pixbuf_new_from_file(pix).scale_simple(w,h,gtk.gdk.INTERP_HYPER)
TypeError: integer argument expected, got float

Märt Põder (boamaod)
Changed in indiv-screenlets:
status: New → Fix Committed
Papp Bence (sclegnrbs)
Changed in indiv-screenlets:
importance: Undecided → Medium
Märt Põder (boamaod)
Changed in indiv-screenlets:
status: Fix Committed → Fix Released
Revision history for this message
Dave Gordon (python-bugz) wrote :

Probably down to a change in Python 2.7. Up until 2.6, if you passed a float to a function that was defined as taking an int, the float would automatically be converted, though possibly with a DeprecationWarnng. In 2.7 (and Python 3000) it's now a TypeError. So, you have to put in an explicit conversion to int wherever this occurs.

There are quite a lot of packages affected by this!

Dave

Revision history for this message
Märt Põder (boamaod) wrote :

Thanks for your remark. I reported a separate bug for the issue (https://bugs.launchpad.net/indiv-screenlets/+bug/827082). We have fixed number of these issues already, but probably there are more of them.

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.