Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If subregion is None script throw on save downloaded pbf #198

Closed
ghost opened this issue Nov 10, 2021 · 2 comments · Fixed by #203
Closed

If subregion is None script throw on save downloaded pbf #198

ghost opened this issue Nov 10, 2021 · 2 comments · Fixed by #203
Labels
bug Something isn't working Docker Docker image and/or related script(s)
Milestone

Comments

@ghost
Copy link

ghost commented Nov 10, 2021

What version of PgOSM Flex are you using?

0.4.0 on Docker.

Docker image

latest

What did you do exactly?

Executes without subregion.

What did happen instead?

Error on pgosm_flex.py, line 448: "No such file or directory".

What did you do to try analyzing the problem?

In case subregion is None, the filename is created using filename = base_name.format(region) (ref).
Now, region is north-america/us.
So pbf_filename will be "north-america/us-latest.osm.pbf", so it is stored in a 'north-america' subfolder contained in output dir. But this subfolder not exists, so wget throw "No such file or directory".

@rustprooflabs rustprooflabs added the bug Something isn't working label Nov 11, 2021
@rustprooflabs rustprooflabs added this to the 0.4.1 milestone Nov 11, 2021
@rustprooflabs rustprooflabs added the Docker Docker image and/or related script(s) label Nov 11, 2021
rustprooflabs added a commit that referenced this issue Nov 11, 2021
@rustprooflabs
Copy link
Owner

@robdesideri Attempting this same approach should now throw a ValueError with guidance about splitting the region into region + subregion. The docs/DOCKER-RUN.md file now has a Regions and Subregions section that helps explain this as well. There may be use cases where the Geofabrik naming/patterns don't work. This set of changes also adds a new --input-file option (#192) to override that portion of functionality.

I suspect there are other improvements RE the docs that could be made to better explain all of this. I am open to any and all suggestions when it comes to make it easier and more understandable! Let me know if you have other questions or if the work here doesn't fully address the problem.

Thanks!

@ghost
Copy link
Author

ghost commented Nov 12, 2021

@rustprooflabs great work, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Docker Docker image and/or related script(s)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant