Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Question about xml2csv tool and plot_csv_timeline visualization

I can confirm that this is a python3-specific issue which is fixed by using open(file) instead of open(file, 'rb').
In the development version of sumo, the tool is now usable with python2 and python3.


Am Fr., 14. Jan. 2022 um 16:23 Uhr schrieb Hriday Sanghvi via sumo-user <sumo-user@xxxxxxxxxxx>:

I am trying to visualise certain behaviour in my bare bones SUMO simulation. Initially, I want to reuse as many visualisation tools as mentioned in as required to gain an insight of the behaviour of vehicles. I did not find an example for plotting certain output files like lanechange outputs.

As mentioned on , I am using the python tool to convert lanechange output to CSV and then attempting to use but I get the following error:

_csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)

After googling the error and on inspecting the source code (, the line
with open(file, 'rb') as f:
seems to be opening it in binary format (bytes) and should instead be opened with 'r' flag instead of 'rb'. Is this a necessary change or is there something I am missing to make this work?
Thank you.

sumo-user mailing list
To unsubscribe from this list, visit

Back to the top