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

OSMOnlineLoader crashes on no data for just one tag #387

Open
Calychas opened this issue Oct 28, 2023 · 0 comments
Open

OSMOnlineLoader crashes on no data for just one tag #387

Calychas opened this issue Oct 28, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Calychas
Copy link
Collaborator

Calychas commented Oct 28, 2023

OSMOnlineLoader().load(
    geocode_to_region_gdf("Warsaw, Poland"),
    {
        "highway": [
            "motorway",  # delete this tag to make OSMOnlineLoader work
            "primary",
            "primary_link",
            "secondary",
            "secondary_link",
            "tertiary",
            "tertiary_link",
            "trunk",
            "trunk_link",
        ]
    },
)
InsufficientResponseError                 Traceback (most recent call last)
[/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb](https://file+.vscode-resource.vscode-cdn.net/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb) Cell 18 line 1
----> [1](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=0) OSMOnlineLoader().load(
      [2](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=1)     geocode_to_region_gdf("Warsaw, Poland"),
      [3](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=2)     {
      [4](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=3)         "highway": [
      [5](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=4)             "motorway",  # delete this tag to make OSMOnlineLoader work
      [6](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=5)             "primary",
      [7](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=6)             "primary_link",
      [8](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=7)             "secondary",
      [9](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=8)             "secondary_link",
     [10](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=9)             "tertiary",
     [11](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=10)             "tertiary_link",
     [12](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=11)             "trunk",
     [13](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=12)             "trunk_link",
     [14](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=13)         ]
     [15](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=14)     },
     [16](vscode-notebook-cell:/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/02_srai.ipynb#Y530sZmlsZQ%3D%3D?line=15) )

File [~/Projects/Personal/srai-tutorial/venv/lib/python3.10/site-packages/srai/loaders/osm_loaders/osm_online_loader.py:101](https://file+.vscode-resource.vscode-cdn.net/Users/kacper.lesniara/Projects/Personal/srai-tutorial/answers/MLinPL/~/Projects/Personal/srai-tutorial/venv/lib/python3.10/site-packages/srai/loaders/osm_loaders/osm_online_loader.py:101), in OSMOnlineLoader.load(self, area, tags)
     99 for polygon, (key, value) in pbar:
    100     pbar.set_description(self._get_pbar_desc(key, value, desc_max_len))
--> 101     geometries = osmnx_download_function(polygon, {key: value})
    102     if not geometries.empty:
...
--> 472     raise InsufficientResponseError(msg)
    474 # remove untagged elements from the final dict of geometries
    475 utils.log(f"{len(geometries)} geometries created in the dict")

InsufficientResponseError: No data elements in server response. Check log and query location/tags.
@Calychas Calychas added the bug Something isn't working label Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant