I'm using Python 3 and gdal/ogr module to open/read .osm.pbf
data files downloaded from OpenStreetMap. With the method presented in this thread, I could successfully parse open the file a week ago through the following code:
import gdal, ogr
gdal.SetConfigOption('OGR_INTERLEAVED_READING', 'YES')
osm_pbf = ogr.Open('file.osm.pbf')
However, it all happened suddenly that the same method won't work any more to the same .osm.pbf
data file. When I try to run osm_pbf = ogr.Open('file.osm.pbf')
now, it always returns None
. As osm_pbf
is always None
, it's impossible to parse the data any further.
Does anyone know what's happening here? Your kind help would be greatly appreciated.