In python, import mapnik causes other gdal WriteArray operation to fail. #1380

Closed
pablotcarreira opened this Issue Aug 7, 2012 · 3 comments

Comments

Projects
None yet
2 participants

It's a very strange bug.
I have an app and at some point I use gdal to write an array to dataset:

dataset.GetRasterBand(1).WriteArray(array.T)

if in any part of the app I 'import mapnik' I get the error:

ERROR 5: Access window out of range in RasterIO(). Requested
(0,0) of size 126x66 on raster of 0x1.

if I remove 'import mapnik', everithing works fine.

Do you have any clue on what the problem is, or a possible solution?
Thx

Owner

springmeyer commented Aug 13, 2012

Sounds very odd. Thanks for the report @pablotcarreira. Can you post your script so I can try to replicate here? Ideally reduce the code to the bare minimal in which you see the error.

  • Can't reproduce -
    I'm working again with Gdal an Mapnik in the same code, (and it includes the "writearray") and the problem is not happening anymore.

Finally I have a general clue on what was the problem, on Ubuntu 12.04 when you install mapnik through apt-get it installs gdallib 1.7 but my project uses gdal 1.9, somehow the mixture of both when importing causes the error. I was able to reproduce that when I installed in a machine with Ubuntu 12.04. Then I upgraded to 13.1 and both mapnik and my project used gdal 1.9 and that worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment