question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pyosmium-up-to-date give a strange message when no update to do

See original GitHub issue

When 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:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lonviacommented, Feb 3, 2021

Fixed in 56c10dacbd31644511485bc36b965423ad4278dc. pyosmium-up-to-date now returns an exit code 2 when the file already is up to date.

0reactions
lonviacommented, Feb 3, 2021

Changed return code to 0.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found