I am using Mapnik 2.0.1rc0 on a Windows 7 with python 2.7 32bits inside a GeoDjango App. I often got this error:
fatal flex scanner internal error--end of buffer missed that makes python to crash (sometimes python crash without error message) when zooming in and out of mapnik tiles rendered in OpenLayers map. The tiled data are stored in spatialite 4.0.
I know such setup could provide a lot of source for this crash. Anybody has encountered this error before or may know where to look to make it works without crashing?
GeoDjango is used as a Tile Map Server. I start by creating the xml in python then I use mapnik python bindings to generate the tiles. The data is already stored in spatialite. So each time I zoom in and out in the map, mapnik query spatialite like this:
query = '(select ' + geometryField + ', "id" from "shapefile_feature" where' + ' shapefile_id=' + str(shapefile.id) + ') as geom' datasource = mapnik.SQLite(file='C:\mygeosite\sqlite3\sql3.db', table=query, srid=4326, geometry_field=geometryField)