Skip to content
This repository has been archived by the owner on Nov 4, 2019. It is now read-only.

OSError: [Errno 17] File exists: animap #16

Closed
planemad opened this issue May 21, 2014 · 8 comments
Closed

OSError: [Errno 17] File exists: animap #16

planemad opened this issue May 21, 2014 · 8 comments

Comments

@planemad
Copy link

When I run

osm-history-renderer/renderer/render-animation.py --style osm-mapnik-style/osm.xml --bbox 8.3122,48.9731,8.5139,49.0744

I get the error

Traceback (most recent call last):
  File "osm-history-renderer/renderer/render-animation.py", line 403, in <module>
    main()
  File "osm-history-renderer/renderer/render-animation.py", line 143, in main
    os.mkdir(anifile)
OSError: [Errno 17] File exists: 'animap'

The end result is an empty directory called animap. I tried other filenames and parameters but get the same error, is this a bug?

@MaZderMind
Copy link
Owner

is this a bug?
no, not on its own. the renderer creates a folder "by default: animap" and tries to render files into this. If rendering fails, the folder stays empty. If you restart rendering afterwards, it can't create that folder and stops, because it prevents rendering into an existing folder.

I often run this while I'm developing a style:

rm -rf animap/ && ./render-animation.py --style /var/osm/styles/osm-hist/osm.xml --bbox -180,-80,180,80

I don't see a bug in the renderer here. Feel free to re-open the ticket if you find something.

Regards, Peter

@planemad
Copy link
Author

Something's still not right, I cleared the folder ran this again

./osm-history-renderer/renderer/render-animation.py --style osm-mapnik-style/osm.xml      --bbox 72.911183,20.117799,72.925265,20.132359 --anistart=2013-12-01 --zoom 16 --type gif --file talasari      --label "%d.%m.%Y" --label-gravity SouthEast
rendering animation from 2013-12-01 00:00:00 to 2014-05-21 22:21:46.127977 in relativedelta(months=+1) steps from bbox [72.911183, 20.117799, 72.925265, 20.132359] in style osm-mapnik-style/osm.xml to file talasari which is of type gif in size 656x722

2013-12-01 00:00:00
2014-01-01 00:00:00
2014-02-01 00:00:00
2014-03-01 00:00:00
2014-04-01 00:00:00
2014-05-01 00:00:00
assembling animation

But the resulting animation is nowhere to be found. The png option works and I get a folder of png's, but unable to get any other format working nor is a folder generated.

@MaZderMind
Copy link
Owner

there should be a talasari.html and a talasari-folder in your current working directory.

@planemad
Copy link
Author

No folder. Only the png option generates a directory with files.
Anyway I can troubleshoot whats going on?

@planemad
Copy link
Author

A file search for talasari turns up nothing as well, so its not getting saved.

@MaZderMind
Copy link
Owner

mhhhmm as it runs through and does things I can't see any issues. For all the world - and without wanting to attack you - it sounds like a mistake on your side.

Are you in the correct folder? Are you looking into the correct place? Are you maybe on a remote-machine doing things there?

To debug it just dig into render-animation.py. It's not that complicated. In Line 397 the html is written and in Line 158 it calls into render.py to paint the map-png.

@planemad
Copy link
Author

Pretty sure i'm in the right folder because I see the generated output using the png or html option. Its the gif and mp4 option that gives no output. I'm a newbie and quite excited I even got this far, thanks for a great tool!

@MaZderMind
Copy link
Owner

Oh sorry, I overlooked that `--type gif``. For gif and mp4 generation the script uses ffmpeg. It may lack appropriate checks for its vailablility. If in doubt, render as png and assemle the animation yourself:

ffmpeg -r 10 -f image2 -i animap/%010d.png -crf 0 lossless.mp4

after all, this is a history renderer - no video-tool. Maybe I should remove all options but html+pngs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants