Discussion:
Mapnik and Tilecache "No module named Mapnik"
Sean Silbaugh
2011-08-16 13:37:23 UTC
Permalink
Hello everyone,

I am trying to get Tilecache to host tiles created by Mapnik in an attempt
to get a WMS supported by Mapnik on Windows XP. Currently, I am using
Apache and cgi to host tilecache. When I access "
Loading Image..."
and also "0/0/1" I get a plain blue tile, but any other zoom levels I get an
error that says:

An error occurred: No module named mapnik
File "C:\Program Files\Apache Software
Foundation\Apache2.2\cgi-bin\tilecache-2.11\TileCache\Service.py", line 343,
in cgiHandler
format, image = service.dispatchRequest( params, path_info, req_method,
host )
File "C:\Program Files\Apache Software
Foundation\Apache2.2\cgi-bin\tilecache-2.11\TileCache\Service.py", line 208,
in dispatchRequest
return self.renderTile(tile, params.has_key('FORCE'))
File "C:\Program Files\Apache Software
Foundation\Apache2.2\cgi-bin\tilecache-2.11\TileCache\Service.py", line 138,
in renderTile
data = layer.render(tile, force=force)
File "C:\Program Files\Apache Software
Foundation\Apache2.2\cgi-bin\tilecache-2.11\TileCache\Layer.py", line 436,
in render
image = self.renderMetaTile(metatile, tile)
File "C:\Program Files\Apache Software
Foundation\Apache2.2\cgi-bin\tilecache-2.11\TileCache\Layer.py", line 396,
in renderMetaTile
data = self.renderTile(metatile)
File "C:\Program Files\Apache Software
Foundation\Apache2.2\cgi-bin\tilecache-2.11\TileCache\Layers\Mapnik.py",
line 27, in renderTile
import mapnik

I installed Mapnik using OSGeo4W but I had to edit the system PATH variable
to get it to work. The path variable is
"C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Python26;C:\Python26\Tools\Scripts;C:\mapnik-0.7.1\lib;C:\WMS\mapnik-0.7.1\lib;C:\WMS\proj\bin;C:\Python26\Scripts;"
and the Pythonpath is "C:\mapnik-0.7.1\python\2.6\site-packages;"

Thanks in advance for any help,
Sean
Sean Silbaugh
2011-08-17 14:41:37 UTC
Permalink
I forgot to mention that in a python shell, import mapnik returns with no
errors. Both pythonpath and path are system variables not user variables.
Let me know if there is any more information that i can supply in order to
help diagnose the problem.

Thanks again,
Sean

Loading...