Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
AIasd opened this issue May 15, 2020 · 4 comments

Comments

@AIasd
Copy link

AIasd commented May 15, 2020

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
Copy link
Owner

bradyz commented May 15, 2020

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
Copy link
Author

AIasd commented May 15, 2020

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

@Yosefnoorani
Copy link

Yosefnoorani commented Nov 14, 2022

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_all_actors
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?

@sidg2110
Copy link

Hi @Yosefnoorani,
I am facing the same error. Did you find a fix for this?

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

No branches or pull requests

4 participants