So I'm trying to debug a strange thing on windows where a shapefile  
opened in another application cannot be opened by Mapnik.

I say strange because the problem does not occur on mac and linux -  
only on windows. But it does make logical sense that opening the same  
file in two running Python processes may create problems.

Essentially, I've written a Python plugin to QGIS that loops through  
all active datasources open in QGIS, builds up a Mapnik map, and  
allows export to XML or rendering in the QGIS canvas.

It works great on mac and linux, but on Windows I get an error like:

 >> shp = Shapefile(file='c:/temp_files/world_borders.shp')
  got exception ...
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "C:\mapnik_0_6_0\site-packages\mapnik\__init__.py", line 132,  
in Shapefile
     return CreateDatasource(keywords)
RuntimeError: failed opening file: The handle is invalid.

QGIS uses the OGR C++ api to open the shapefile in read/write mode. I  
assume that the mapnik shapefile input opens read-only.

Anyone have any ideas of potential workarounds?

- Dane
_______________________________________________
Mapnik-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-devel

Reply via email to