aspectumapp / osm2geojson

Convert OSM and Overpass XML/JSON to GeoJSON
MIT License
97 stars 15 forks source link

Can not run "OSM-xml to Geojson" example in python3 #3

Closed clement-igonet closed 4 years ago

clement-igonet commented 4 years ago

Trying the "OSM-xml to Geojson" example with python3, I got:

Traceback (most recent call last):
  File "./osm2nominatim.py", line 1, in <module>
    import osm2geojson
  File "/usr/lib/python3.5/site-packages/osm2geojson/__init__.py", line 2, in <module>
    from .helpers import *
  File "/usr/lib/python3.5/site-packages/osm2geojson/helpers.py", line 29
    data=f"data={encoded}",
                         ^
SyntaxError: invalid syntax

Could you indicate minimal python version to use ?

ralienpp commented 4 years ago

I use it with Python 3.6.9.

rapkin commented 4 years ago

This formatter available in 3.6 (https://www.python.org/dev/peps/pep-0498/). But I will change syntax to support older versions of python.