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_runner.py --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 “scenario_runner.py”, line 459, in _load_and_run_scenario
self._args.debug)
File “/home/nadra/scenario_runner/srunner/scenarios/follow_leading_vehicle.py”, line 122, in init
criteria_enable=criteria_enable)
File “/home/nadra/scenario_runner/srunner/scenarios/basic_scenario.py”, line 80, in init
self._initialize_environment(world)
File “/home/nadra/scenario_runner/srunner/scenarios/basic_scenario.py”, line 123, in _initialize_environment
world.set_weather(self.config.weather)

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
-py3.6-linux-x86_64.egg
export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/agents
export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla
export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI

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/scenario_configuration.py and check if, for your version, it’s there?

Hi
actually scenario_runnre is the module in carla for running and creating our own scenarios.
This is the link https://carla-scenariorunner.readthedocs.io/en/latest/getting_scenariorunner/
I am ctually not doing anything i amjsut running scenario_runner.py file present in the scenario_runner folder by using the command “python3 scenario_runner.py --scenario FollowLeadingVehicle_1 --reloadWorld”.
Thanks

HI Lopez!

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

Thanks

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 scenario_runner.py 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.