dezhin / osmread Goto Github PK
View Code? Open in Web Editor NEWSimple library for reading OpenStreetMap XML and PBF data files
Simple library for reading OpenStreetMap XML and PBF data files
http://overpass-api.de/api/map?bbox=25.2383,54.6367,25.3238,54.7292 - this is the ".osm" file
Error
File "/Users/admin/workspace/catalog/content/osm.py", line 136, in get_osm_rows
for entity in osmread.parse_file(fn):
File "/Users/admin/workspace/catalog/env/lib/python2.7/site-packages/osmread/init.py", line 25, in parse_file
for e in parser.parse_file(filename):
File "/Users/admin/workspace/catalog/env/lib/python2.7/site-packages/osmread/parser/init.py", line 18, in parse_file
for e in self.parse(fp):
File "/Users/admin/workspace/catalog/env/lib/python2.7/site-packages/osmread/parser/xml.py", line 34, in parse
for event, elem in context:
File "iterparse.pxi", line 491, in lxml.etree.iterparse.next (src/lxml/lxml.etree.c:98565)
File "iterparse.pxi", line 543, in lxml.etree.iterparse._read_more_events (src/lxml/lxml.etree.c:99086)
File "parser.pxi", line 601, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:74879)
lxml.etree.XMLSyntaxError: None
Hi. I am trying to install osmread
using pip install osmread
in Anaconda prompt. However, it throws up the following error message. Can someone help?
Collecting osmread
Using cached osmread-0.2.tar.gz (12 kB)
Preparing metadata (setup.py) ... done
Collecting argparse
Using cached argparse-1.4.0-py2.py3-none-any.whl (23 kB)
Collecting lxml
Downloading lxml-4.9.0-cp310-cp310-win_amd64.whl (3.6 MB)
---------------------------------------- 3.6/3.6 MB 8.8 MB/s eta 0:00:00
Collecting protobuf==3.0.0b3
Using cached protobuf-3.0.0b3.tar.gz (117 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\dbho0002\AppData\Local\Temp\pip-install-b57sx51_\protobuf_03c2a19988264f278eb8d36346edba7a\setup.py", line 17, in <module>
from distutils.command.build_py import build_py_2to3 as _build_py
ImportError: cannot import name 'build_py_2to3' from 'distutils.command.build_py' (C:\Users\dbho0002\Anaconda3\envs\lmm\lib\site-packages\setuptools\_distutils\command\build_py.py)
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Keywords like unicode
and long
should become aliases for str
and int
depending on the version of python being used.
Are you thinking on uploading it to PyPI? It shouldn't be much work since you already
have the setup.py
file with the metadata in place.
Thanks!
First of all thanks for the great project! I stumbled over a small issue with the lxml library because of missing DLLs even though I have a standard installation. Of course this is an issue in one of your dependencies and not directly your code but still you might like my pull request suggestion?
Actual version supports python3, but not the one on PyPi.
Thanks ;-)
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.5/site-packages/osmread/init.py", line 25, in parse_file
for e in parser.parse_file(filename):
File "/usr/lib/python3.5/site-packages/osmread/parser/init.py", line 18, in parse_file
for e in self.parse(fp):
File "/usr/lib/python3.5/site-packages/osmread/parser/xml.py", line 39, in parse
_id = int(attrs['id'])
NameError: name 'long' is not defined
Hello,
Is following necessary in setup.py?
if sys.version_info > (3,):
requirements.append('protobuf==3.0.0b3')
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.