artemp/trac2github — Issue #802: better error message when saving an image and directory does not exist
Author: artemp
Created: 2011-10-09 20:51:44+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.