Skip to content

Downloading data from geofabrik stopped working #461

@michalgwo

Description

@michalgwo

When I try to download data from geofabrik, I get an error.

For example, this command: download-osm geofabrik europe/poland
Result in this:

/home/michalgwo/.local/bin/download-osm:601: DeprecationWarning: The explicit passing of coroutine objects to asyncio.wait() is deprecated since Python 3.8, and scheduled for removal in Python 3.11.
  await self.load_source(src)
Unable to auto-detect the source for 'europe/poland'

The same happens when I try to download with a URL download-osm url https://download.geofabrik.de/europe/germany/baden-wuerttemberg-latest.osm.pbf

/home/michalgwo/.local/bin/download-osm:601: DeprecationWarning: The explicit passing of coroutine objects to asyncio.wait() is deprecated since Python 3.8, and scheduled for removal in Python 3.11.
  await self.load_source(src)
Unable to auto-detect the source for 'https://download.geofabrik.de/europe/germany/baden-wuerttemberg-latest.osm.pbf'

It was working fine some time ago, so I checked if geofabrik changed something, and indeed, they did: https://blog.geofabrik.de/en/index.php/2025/07/24/download-geofabrik-de-to-use-http-redirects-for-latest-files/

So, instead of the latest data, I tried to download a specific file, and it worked:

download-osm url http://download.geofabrik.de/europe/germany/baden-wuerttemberg-250903.osm.pbf

Therefore, it looks like the problem is a redirect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions