hitrust / gmapcatcher

Automatically exported from code.google.com/p/gmapcatcher
0 stars 0 forks source link

Export not working due to a TypeError when calling do_combine #251

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
on a Fedora System with python-imaging.x86_64 1.1.7-2.fc14 all seemed to work 
except for image exporting.

After fiddling a bit with the code, I found that in the do_combine function in 
the gmapcatcher/mapServices.py file, there was an exception thrown when 
creating the image, because Image.new needs the tuple size to cointain integer 
argument and not float as passed.

The error thrown was something like (tested on python shell):

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/PIL/Image.py", line 1763, in new
    return Image()._new(core.fill(mode, size, color))
TypeError: integer argument expected, got float

I just changed:
result = Image.new("RGBA", size)
with:
result = Image.new("RGBA", [int(i) for i in size])
and all works fine.

Original issue reported on code.google.com by luigi.ma...@gmail.com on 23 Jan 2011 at 5:20

GoogleCodeExporter commented 9 years ago
This a quick & dirty fix, a good one! but we should get to the bottom of this 
and fix it at the source not at the destination...

http://code.google.com/p/gmapcatcher/source/browse/trunk/maps.py?r=1112#739

Original comment by heldersepu on 23 Jan 2011 at 6:09

GoogleCodeExporter commented 9 years ago
This issue should now be OK, please see r1125

Original comment by heldersepu on 6 Feb 2011 at 7:05