bradyz / 2020_CARLA_challenge

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

Encountered an TypeError when trying to run the data collection as well as the pretrained model #1

Closed AIasd closed 4 years ago

AIasd commented 4 years ago

Hello, I followed the instruction and was trying to run 1.data collection 2.the pre-trained model but encountered the same error message as the following. I would appreciate if you can shed some lights on the error message. Thanks!

Preparing scenario: RouteScenario_19
The scenario cannot be loaded
type object 'ParallelPolicy' has no attribute 'SUCCESS_ON_ONE'
Exception ignored in: <function RouteScenario.__del__ at 0x7f82d9d928c0>
Traceback (most recent call last):
  File "/home/zhongzzy9/Documents/self-driving-car/2020_CARLA_challenge/leaderboard/leaderboard/scenarios/route_scenario.py", line 604, in __del__
    self.remove_all_actors()
  File "/home/zhongzzy9/Documents/self-driving-car/2020_CARLA_challenge/scenario_runner/srunner/scenarios/basic_scenario.py", line 181, in remove_all_actors
    for i, _ in enumerate(self.other_actors):
AttributeError: 'RouteScenario' object has no attribute 'other_actors'
Traceback (most recent call last):
  File "leaderboard/leaderboard/leaderboard_evaluator.py", line 379, in main
    leaderboard_evaluator.run(arguments)
  File "leaderboard/leaderboard/leaderboard_evaluator.py", line 332, in run
    StatisticsManager.save_global_record(global_stats_record, self.sensors, args.checkpoint)
  File "/home/zhongzzy9/Documents/self-driving-car/2020_CARLA_challenge/leaderboard/leaderboard/utils/statistics_manager.py", line 256, in save_global_record
    '{:.3f}'.format(stats_dict['infractions']['collisions_layout']),
TypeError: unsupported format string passed to list.__format__
Done. See sample_data/route_19.txt for detailed results.
Downloading: "https://download.pytorch.org/models/resnet50-19c8e357.pth" to /home/zhongzzy9/.cache/torch/checkpoints/resnet50-19c8e357.pth
100%|██████████████████████████████████████████████████████████████████████████████████████| 97.8M/97.8M [00:02<00:00, 43.8MB/s]
<All keys matched successfully>
Preparing scenario: RouteScenario_19
The scenario cannot be loaded
type object 'ParallelPolicy' has no attribute 'SUCCESS_ON_ONE'
Exception ignored in: <function RouteScenario.__del__ at 0x7f63028318c0>
Traceback (most recent call last):
  File "/home/zhongzzy9/Documents/self-driving-car/2020_CARLA_challenge/leaderboard/leaderboard/scenarios/route_scenario.py", line 604, in __del__
    self.remove_all_actors()
  File "/home/zhongzzy9/Documents/self-driving-car/2020_CARLA_challenge/scenario_runner/srunner/scenarios/basic_scenario.py", line 181, in remove_all_actors
    for i, _ in enumerate(self.other_actors):
AttributeError: 'RouteScenario' object has no attribute 'other_actors'
Traceback (most recent call last):
  File "leaderboard/leaderboard/leaderboard_evaluator.py", line 379, in main
    leaderboard_evaluator.run(arguments)
  File "leaderboard/leaderboard/leaderboard_evaluator.py", line 332, in run
    StatisticsManager.save_global_record(global_stats_record, self.sensors, args.checkpoint)
  File "/home/zhongzzy9/Documents/self-driving-car/2020_CARLA_challenge/leaderboard/leaderboard/utils/statistics_manager.py", line 256, in save_global_record
    '{:.3f}'.format(stats_dict['infractions']['collisions_layout']),
TypeError: unsupported format string passed to list.__format__
Done. See /home/zhongzzy9/Documents/self-driving-car/2020_CARLA_challenge/models/route_19.txt for detailed results.
bradyz commented 4 years ago

seems like a py-trees dependency problem.

can you run

pip freeze | grep tree

and verify the version of py-trees you're using? i'm using 0.8.3, as stated in

carla_project/requirements.txt

AIasd commented 4 years ago

Yes, this solves my issue. Thank you so much!

Yosefnoorani commented 1 year ago

Hi, I have the same problem:

Preparing scenario: RouteScenario_0 The scenario cannot be loaded Traceback (most recent call last): File "scenario_runner.py", line 388, in _load_and_run_scenario scenario = RouteScenario(world=self.world, File "/home/aim2/Projects/Yosef/scenario_runner/srunner/scenarios/route_scenario.py", line 154, in init self._update_route(world, config, debug_mode) File "/home/aim2/Projects/Yosef/scenario_runner/srunner/scenarios/route_scenario.py", line 186, in _update_route gps_route, route = interpolate_trajectory(world, config.trajectory) File "/home/aim2/Projects/Yosef/scenario_runner/srunner/tools/route_manipulation.py", line 141, in interpolate_trajectory grp = GlobalRoutePlanner(world.get_map(), hop_resolution) TypeError: init() takes 2 positional arguments but 3 were given init() takes 2 positional arguments but 3 were given Exception ignored in: <function RouteScenario.del at 0x7f6e84fae310> Traceback (most recent call last): File "/home/aim2/Projects/Yosef/scenario_runner/srunner/scenarios/route_scenario.py", line 516, in del self.remove_all_actors() File "/home/aim2/Projects/Yosef/scenario_runner/srunner/scenarios/basic_scenario.py", line 202, in remove_allactors for i, in enumerate(self.other_actors): AttributeError: 'RouteScenario' object has no attribute 'other_actors' No more scenarios .... Exiting

and when I run pip freeze | grep tree I get: py-trees==0.8.3 rqt_tf_tree==0.6.2

And it is still not working, what can be the problem?