[Mapit] genmap.fcgi doesn't return images

Moritz Lenz moritz at casella.verplant.org
Sun Feb 11 23:19:35 CET 2007


first thank you for your fast response.
And sorry for PM, now to the list ;-)

Bernhard Reiter wrote:
> Hi Moritz,
> On Sunday 11 February 2007 02:04, Moritz Lenz wrote:
>> I tried to setup mapit-1.0.2 on my local machine (Debian GNU/Linux 3.1
>> testing)
> wouldn't this be "Sarge" which is stable?

Yes, it would. I was too sleepy when I wrote that.
I have Etch aka testing aka 4.0 (iirc).

>> I adapted mapconfig.py and then ran checkconfig.py. It says at the end:
>> Summary:
>> all tile image files can be opened
>> all tile image files can be loaded
>> all marker image files can be opened
>> all marker image files can be loaded
>> 1 python file(s) can't be compiled/imported:
>> modmapit
>> `python modmapit`
>> complains about not beeing able to load _apache, which appears to be due
>> to the fact that it's not run from mode_python (I'm using the fastcgi
>> interface).
> Should be fine then.
>> When I call showmap.fgci from the browser it shows me the borders of the
>> image map, zoom icons etc. but no images.
>> When I call the image map URL manually, It takes a very long time and
>> then I get a 501 internal server error.
>> When I run `python genmap` I get:
>> Content-type: image/png
>> Traceback (most recent call last):
> This is the problem we need to concentrate on:
>>   File "genmap", line 42, in ?
>>     main()
>>   File "genmap", line 37, in main
>>     image = makemap.generate_map(parameters)
>>   File "/home/moritz/public_html/mapit/makemap.py", line 78, in
>> generate_map image = PIL.Image.new("RGB", (result_width, result_height),
>> 0xFFFFFFFF) File "/usr/lib/python2.4/site-packages/PIL/Image.py", line
>> 1610, in new return Image()._new(core.fill(mode, size, color))
>> SystemError: new style getargs format but argument is not a tuple
>> Any idea what might be wrong?
> The problems seems to arise from PIL somehow.
>> In case it's important a few version numbers:
>> python:	2.4.4-2
>> apache:	2.2.3-3.2
>> fastcgi: 2.4.2-8
> Apache and fastcgi are not yet in the picture, 
> so it would be interesting which version of PIL you are using
> and how was it installed.

It was installed in the debian-way via apt-get/aptitude, version is

Oddly enough it works when I start genmap explictly with python-2.3
instead of 2.4, so I'll try to fall back to pyhton2.3.

I change the shebang lines of all the python scripts to
and when I run ./genmap from the command line I get the desired output
(Content-Type: image/png, an empty line + binary data, which _is_ a
png), but over the web server I still get the same errors.

Is fastcgi somehow using a different interpreter from the one specified
in the #!-line? (And yes, I restarted apache2 after changing the

Thanks again,

Moritz Lenz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://www.intevation.de/pipermail/mapit/attachments/20070211/698fe2c3/signature.asc

More information about the Mapit mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)