Code not work - DESPERATE HELP :(

fx5900 luong8201 at
Thu Oct 30 19:48:57 CET 2008


   i am trying to convert an .osm (openstreetmap) file into gml format  and
finally to shapefile given this wiki info I'm using windows and when i
entered the following commands < map_01_data.osm >
map_01_data.gml  on my dos prompt i get a number of errors, some of which
are bellow:

Traceback <most recent call last>:
File "C:\, line 86, in <module>
xml.sax.parse <sys.stdin, osmParser >
IOError : [Errono 9] bad discriptor

i did manage to convert it to gml format but was clearly unsuccesful because
of the error and it was 1kb. 
Another point i would like to add is that ran the file using PythonWin
(ActiveState) with map_01_data.osm as the argument and after hitting ok,
then cancel i got
Traceback (most recent call last):
line 310, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\", line 86, in <module>
    xml.sax.parse( sys.stdin, osmParser )
  File "C:\Python25\lib\xml\sax\", line 33, in parse
  File "C:\Python25\lib\xml\sax\", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "C:\Python25\lib\xml\sax\", line 123, in parse
  File "C:\Python25\lib\xml\sax\", line 211, in feed
  File "C:\Python25\lib\xml\sax\", line 38, in fatalError
    raise exception
SAXParseException: <stdin>:1:0: syntax error

Please would somebody mind telling how i can covert my osm file into the
.gml format using the python file on the dos command or using pythonwin.

View this message in context:
Sent from the Python - python-list mailing list archive at

More information about the Python-list mailing list