Skip to content

Conversation

@tomcur
Copy link

@tomcur tomcur commented Apr 1, 2020

Description

Fixes an issue with parsing csv column header names in the plotter code. On my Linux machine, the last name in the header list had its last character stripped (e.g. end_point would be parsed as end_poin). This PR changes the parsing to use a more generic whitespace stripper.

The original code resulted in the following error:

Traceback (most recent call last):
  File "/home/thomas/code/autonomous-driving/carla/coiltraine/coil_core/run_drive.py", line 128, in driving_benchmark
    checkpoint_number, town_name, g_conf.PROCESS_NAME.split('_')[1])
  File "/home/thomas/code/autonomous-driving/carla/coiltraine/plotter/plot_on_map.py", line 170, in plot_episodes_tracks
    episodes_positions, travelled_distances = split_episodes(meas_file)
  File "/home/thomas/code/autonomous-driving/carla/coiltraine/plotter/plot_on_map.py", line 87, in split_episodes
    previous_end_point = details_matrix[0, header_details.index('end_point')]
ValueError: 'end_point' is not in list

Where has this been tested?

Platform(s): linux
Python version(s): 3.5

Possible Drawbacks

None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant