pyosmium-up-to-date give a strange message when no update to do
See original GitHub issueWhen launching pyosmium-up-to-date on a pbf, and no update is available from the server, the command reports an error on a state file, instead of reporting that no update is available.
$ wget http://download.geofabrik.de/europe/andorra-latest.osm.pbf
$ pyosmium-up-to-date -vvvvv andorra-latest.osm.pbf
2020-12-10 22:04:11,336 DEBUG: Replication information found in OSM file header.
2020-12-10 22:04:11,336 DEBUG: Replication URL: http://download.geofabrik.de/europe/andorra-updates
2020-12-10 22:04:11,336 DEBUG: Replication sequence: 2817
2020-12-10 22:04:11,336 DEBUG: Replication timestamp: 2020-12-09T21:42:03Z
2020-12-10 22:04:11,338 INFO: Using replication service at http://download.geofabrik.de/europe/andorra-updates
2020-12-10 22:04:11,338 DEBUG: Using given sequence ID 2817
2020-12-10 22:04:11,406 DEBUG: Loading state info 2818 failed with: HTTP Error 404: Not Found
2020-12-10 22:04:11,408 ERROR: Cannot download state information for ID 2817. Is the URL correct?
I would expect to print the message “No new updates found.” instead.
In addition, would it be possible to generate a different error code when no update is available? It would be useful to check if we should rerun the script or not, in case of a transient serveur connection issue.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Osm2pgsql Manual
OSM data is imported once into the database and will not change afterwards. If you want to update the data, you have to...
Read more >Why does my custom OSRM server not give alternative routes ...
There could be a few reasons I could think of: The docker image isn't up to date with the latest release. Looking at...
Read more >Debian Bug report logs - #866354 armel: symbol ...
and it's >> missing the changes to the symbol versioning. I don't think that adding the >> missing bits to the gcc-6 source...
Read more >Ask us Anything - We are OpenStreetMap Foundation Board ...
This is our first AMA so please be gentle if we make some mistakes or forget something ;) ... And pyosmium has some...
Read more >Geomatikk - Hc Svnt Dracones
The no-schema approach of NoSQL document stores is a tempting solution for importing heterogenous geospatial data to a spatial database. However ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed in 56c10dacbd31644511485bc36b965423ad4278dc. pyosmium-up-to-date now returns an exit code 2 when the file already is up to date.
Changed return code to 0.