pnorman / ogr2osm

pnorman's version of UVM's Rewrite of ogr2osm
Other
78 stars 46 forks source link

syntax error #18

Open jremillard opened 11 years ago

jremillard commented 11 years ago

File "ogr2osm/ogr2osm.py", line 579 featuresmap = {feature.geometry : feature for feature in features} ^ SyntaxError: invalid syntax

Python version 2.6.6, stable version in debian. The ^ is actually pointing at the "for".

pnorman commented 11 years ago

I believe this is a python2.6 issue.

Because ogr2osm requires ogr and I'm not willing to risk messing up my complicated gdal setup on my server I'll have to test this on a vm.

jremillard commented 11 years ago

The older version of the script that you forked from has the exact same problem. I am running in a VM from the debian-6.0.6-amd64-businesscard.iso, if you want to reproduce it in a VM.

I guess the script requires python 3?

pnorman commented 11 years ago

No, python2.7 is what I test against.

If I can fix it to work with python2.6 I will, but the easy fix should be switching to python2.7

pnorman commented 11 years ago

https://github.com/iandees/ogr2osm/commit/94bcf404571c241314f8024a31c176f4281ce686 would fix this, but I need to profile it for speed to see if I can introduce it for all versions of python, or just as a fallback