Hello List, I'm not sure if the issue that has been puzzling me is fundamentally mapnik, apache, windows or some combination...
I've been setting up TileStache <http://tilestache.org/>on a Windows 7 (64 bit) box to work with Apache 2.2, Python 2.6.5, mapnik 0.7.1, postgreSQL 8.4/postgis 1.5 The python/mapnik/Apache/python installation works fine and has been for some time. I have a number of python scripts that create static maps and tiles with no problem. Initially, I got TileStache cacheing tiles from OSM to prove the basic installation - no problem. Adding map generation, using mapnik, to TileStache exposed an odd problem. I could not get any python script which was invoked by apache (using CGI for simplicity) to import mapnik. ( I removed all the TileStache code and created a very minimal cgi script that did little more than import mapnik to prove this. The same script invoked manually, by cmd line or using idle, imported mapnik without complaint. I suspected problems with paths or permissions and double checked pythonpath, mapniklibpath, httpd.conf, folder properties etc. I eventually unearthed (from http://www.imladris.com/Scripts/PythonForWindows.html) a fix that involved adding a registry key that points at C:\Program Files (x86)\mapnik-0.7.1\python\2.6\site-packages (I know that is not where the standard installation instructions suggest but it is where I have always put mapnik - editing ...python\2.6\site-packages\mapnik\paths.py to suit.) This now works and TileStache is drawing maps on demand and cacheing as I'd hoped. Using Regedit to add a registry key feels like more of a hack than a fix, though. Can anyone suggest what I should have done instead? Philip -- Philip Howarth Cambridge UK email: [email protected]
_______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

