bradyz / 2020_CARLA_challenge

"Learning by Cheating" (CoRL 2019) submission for the 2020 CARLA Challenge
181 stars 49 forks source link

TypeError: unsupported format string passed to list.__format__ #10

Closed nuomizai closed 4 years ago

nuomizai commented 4 years ago

I met this error when I ran the run_agent.sh

Traceback (most recent call last): File "leaderboard/leaderboard/leaderboard_evaluator.py", line 380, in main leaderboard_evaluator.run(arguments) File "leaderboard/leaderboard/leaderboard_evaluator.py", line 333, in run StatisticsManager.save_global_record(global_stats_record, self.sensors, args.checkpoint) File "/home/quan/2020_CARLA_challenge/leaderboard/leaderboard/utils/statistics_manager.py", line 257, in save_global_record '{:.3f}'.format(stats_dict['infractions']['collisions_layout']), TypeError: unsupported format string passed to list.format

and I printed stats_dict['infractions']['collisions_layout'] by adding the code

print('infraction:', stats_dict['infractions']['collisions_layout'], stats_dict['infractions']['collisions_pedestrian']) the result was:

infraction: [] []

It seemed that the list object cannot using '{:.3f}'.format. I wanted to figure out what was the contend should be in the infraction list, the pedestrains' id or the total infraction numbers? And how can I fix this misformat properly? Thank you.

bradyz commented 4 years ago

I usually see this error when there is some sort of runtime error during the route were there any other errors before what you pasted?

nuomizai commented 4 years ago

It seemed that this problem was related to the issue in #11 . After I fixed the problem in #11 , this misformat problem has gone. Thank you, @bradyz .