ScenarioConfiguration' object has no attribute 'weather

i have successfully installed the carla v0.9.11 and python3.6 in ubuntu 18.04

I want to run the scenario_runner which is already installed.

when i run this command

python3 --scenario FollowLeadingVehicle_1 --reloadWorld

after this i got this error

Preparing scenario: FollowLeadingVehicle_1
The scenario cannot be loaded
Traceback (most recent call last):
File “”, line 459, in _load_and_run_scenario
File “/home/nadra/scenario_runner/srunner/scenarios/”, line 122, in init
File “/home/nadra/scenario_runner/srunner/scenarios/”, line 80, in init
File “/home/nadra/scenario_runner/srunner/scenarios/”, line 123, in _initialize_environment

AttributeError: ‘ScenarioConfiguration’ object has no attribute 'weather’
‘ScenarioConfiguration’ object has no attribute ‘weather’
Destroying ego vehicle 1036
ERROR: failed to destroy actor 1036 : unable to destroy actor: not found
No more scenarios … Exiting

I have set the paths in my ubuntu by using following commands:

export CARLA_ROOT=/home/nadra/carla
export SCENARIO_RUNNER_ROOT=/home/nadra/scenario_runner

export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.11
export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/agents

I am not sure what is the problem.

Thanks in advance

What is scenario_runner ? :face_with_monocle:
You wanted to change the weather ?
For my part I have Carla 0.9.10 and python 3.7 .
I can change the weather as i WeatherParameters is a carla class.

Hey @nadra, that’s a weird error because ScenarioConfiguration object does have the attribute ‘weather. Can you go to srunner/scenarioconfigs/ and check if, for your version, it’s there?

actually scenario_runnre is the module in carla for running and creating our own scenarios.
This is the link
I am ctually not doing anything i amjsut running file present in the scenario_runner folder by using the command “python3 --scenario FollowLeadingVehicle_1 --reloadWorld”.

HI Lopez!

Yes it is a weird error. And yes i have check,it is located in the folder you mention.But still i am not sure why it is not able to find it.


Then I’m confused, this doesn’t make sense to me at all. Before your error triggers, you’ve gone parsed the configuration which does indeed parse the weather. Could you add some prints below this line at and check for the weather? This really doesn’t make any sense.

yes i try to print it but its not printing i think it is not going inside the for loop.
the current error is as follows

The image you are showing is different from you original post. That makes more sense, as its the first time the weather attribute is called. Then, can you do a print one line before that (here) checking the attributes of ScenarioConfiguration? If that fails, please check what ScenarioConfiguration are importing, that’s the only think I of

Thank you so much. I have solved this problem. It was not related to the Carla ,you were right .I have comment the weather attribute in the file and it was not reading by the compiler obvioulsy.

Thanks once again for your support.