Today, trying to slice an image with Gimp, with my Kubuntu Oneiric I have found this strange error message: “TypeError in slice(): integer argument expected, got float”.

This is a well know bug, but until it will be fixed, you can fix it by yourself.

Run from the terminal your favorite text editor (gedit, kate, vim, nano, pico, etc…) and replace the bad line with the good one.

sudo kate /usr/lib/gimp/2.0/plug-ins/py-slice.py

replace at line 172 (ymmv)

temp_image.crop(int(right – left), int(bottom – top), int(left), int(top))

with

temp_image.crop(int(right - left), int(bottom - top), int(left), int(top))

Save and close. Happy slicing! 😉


1 Comment

puji · July 15, 2013 at 02:47

I use GIMP 2.6.11 on Linux MINT 12, I have follow your instruction,but still have the error

Leave a Reply to puji Cancel reply

Avatar placeholder

Your email address will not be published. Required fields are marked *