mapnik-org/mapnik — Issue #799: better error message when saving an image and directory does not exist
Author: artemp
Created: 2011-10-11 08:12:45+00:00
State: open
Labels: Core_Library

Currently if 'foo' does not exist:

{{{
#!python
im.save('foo/map.png')
}}}

will fail with:

{{{
RuntimeError: Could not write file to foo/map.png
}}}

It would be nice if mapnik would either create the directory and not fail or at least fail with a message that explains why.