NopMap,

> In my python render script, I am using render_to_file() to write the render
> result to a ram disk and then read it again to do some post processing in
> PIL. This works thousands of times in a row, but occasionally it fails with
> the following error message.
> 
>     render_to_file( m, tmp_file )
> RuntimeError: Could not write file to r:/hill_tmp.png

It should be possible to convice it to give more details, no?

Is it possible that someone else is reading the file while you are 
trying to write - I heard that Windows is picky about that? Either your 
own process, or maybe something completely unrelated, some program that 
indexes your RAM disk for some stupid reason or so?

> Is there any chance that mapnik does not close a file properly after
> render_to_file under rare circumstances? It's the only plausible idea I have
> so far.

If you include an auto-increment counter in the file name then that 
would at least reduce the chances of someone still reading the old file 
while you are creating the new one.

Bye
Frederik

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

Reply via email to