iandees / pyosm

A Python library for parsing OSM streams.
MIT License
15 stars 4 forks source link

Cannot parse .osc files with no changeset id #10

Open divyanipatil opened 4 years ago

divyanipatil commented 4 years ago

I'm trying to parse an osm change file downloaded from here. But I'm unable to do so as the parser fails with an error when accessing elem.attrib['changeset']

File "/home/patildiv/anaconda3/envs/shifu/lib/python3.6/site-packages/pyosm/parsing.py", line 250, in iter_osm_stream for a in iter_osm_change_file(gzipper, parse_timestamps): File "/home/patildiv/anaconda3/envs/shifu/lib/python3.6/site-packages/pyosm/parsing.py", line 148, in iter_osm_change_file int(elem.attrib['changeset']), File "src/lxml/etree.pyx", line 2479, in lxml.etree._Attrib.__getitem__ KeyError: 'changeset'

Any work-around to parse such files??