Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Stop-to-stop travel times and Public Transport schedules

Hi Fay,

it has to do something with character encoding (e.g. UTF-8 vs ISO8859).

Check whether the coding in additional.xml (first line) matches the used character set in the rest.

It seems that the parser uses codepage 1253, but in the rest of the file the coding might be UTF-8.

Regards, Harald

Am 10.04.20 um 19:39 schrieb Fay Kostopoulou:
Dear all,

I am trying to import stop to stop travel times and PT schedules via https://sumo.dlr.de/docs/Tutorials/PT_from_OpenStreetMap.html 
running " python ptlines2flows.py -n net.net.xml -s additional.xml -l ptlines.xml  -o flows.rou.xml -p 600 --use-osm-routes ", but it gives me the following error message: 

generating trips...
Traceback (most recent call last):
  File "ptlines2flows.py", line 357, in <module>
    main(get_options())
  File "ptlines2flows.py", line 350, in main
    trpMap, stopNames = createTrips(options)
  File "ptlines2flows.py", line 119, in createTrips
    for stop in sumolib.output.parse(options.ptstops, 'busStop'):
  File "C:\Program Files (x86)\Eclipse\Sumo\tools\sumolib\xml.py", line 252, in parse
    for _, parsenode in ET.iterparse(_open(xmlfile)):
  File "C:\Users\Fay\AppData\Local\Programs\Python\Python38-32\lib\xml\etree\ElementTree.py", line 1229, in iterator
    data = "" * 1024)
  File "C:\Users\Fay\AppData\Local\Programs\Python\Python38-32\lib\encodings\cp1253.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9f in position 1097: character maps to <undefined>

Could you help me with it?

Thank you for your time,
Fay

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top