GIMP: TypeError in slice(): integer argument expected, got float
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!







