Hi!

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

This has happened several times and I could not find an obvious reason:
- The ram disk has plenty of free space
- The file can be manipulated and deleted manually after the error message
has occurred (but the script has exited at that time)
- If I restart the script, it works - for a time
- The file is only opened once for reading in PIL, all writing is done to a
different drive

I have used the same rendering script for hundreds of thousands of tiles
with 0.6.1 and never encountered this problem. It has occurred several times
since I switched to 0.7. It is hard to debug as it only happends every 1000
renders or so.

Has anybody observed similar problems?
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.

bye
            Nop

-- 
View this message in context: 
http://n2.nabble.com/Write-error-in-render-to-file-in-0-7-tp4590403p4590403.html
Sent from the Mapnik Users mailing list archive at Nabble.com.
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to