py-slice.py crashed with TypeError in slice(): integer argument expected, got float

Bug #767048 reported by Gregware
This bug report is a duplicate of:  Edit Remove
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gimp (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: gimp

this is happend using slice tool

ProblemType: Crash
DistroRelease: Ubuntu 11.04
Package: gimp 2.6.11-1ubuntu6
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Wed Apr 20 13:06:08 2011
ExecutablePath: /usr/lib/gimp/2.0/plug-ins/py-slice.py
InterpreterPath: /usr/bin/python2.7
ProcCmdline: /usr/bin/python /usr/lib/gimp/2.0/plug-ins/py-slice.py -gimp 18 16 -run 0
ProcEnviron:
 LANGUAGE=fr_BE:en
 LANG=fr_BE.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/lib/gimp/2.0/plug-ins/py-slice.py', '-gimp', '18', '16', '-run', '0']
SourcePackage: gimp
Title: py-slice.py crashed with TypeError in slice(): integer argument expected, got float
UpgradeStatus: Upgraded to natty on 2011-04-18 (1 days ago)
UserGroups: adm admin audio cdrom dialout dip fax floppy fuse lpadmin netdev plugdev powerdev sambashare scanner tape video

Revision history for this message
Gregware (gregware) wrote :
Revision history for this message
Apport retracing service (apport) wrote : This bug is a duplicate

Thank you for taking the time to report this crash and helping to make Ubuntu better. This particular crash has already been reported and is a duplicate of bug #733055, so is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Please continue to report any other bugs you may find.

tags: removed: need-duplicate-check
visibility: private → public
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! The bug of which this is a duplicate is probably caused by this change too :(

Dave

Revision history for this message
Daniel M. Basso (dmbasso) wrote :

The original of this duplicate bug doesn't exist anymore?

Well, while this is sorted out, a simple workaround is to apply the attached patch to a user copy of the plug-in:

cd .gimp-2.6/plug-ins/
cp /usr/lib/gimp/2.0/plug-ins/py-slice.py .
patch <py-slice.patch # download the patch to the same folder prior to this command

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.
  • Duplicate of a private bug Remove

Other bug subscribers

Remote bug watches

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