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

AttributeError: 'OSC2ScenarioConfiguration' object has no attribute 'route' 'OSC2ScenarioConfiguration' object has no attribute 'route' No more scenarios .... Exiting #1057

Open
qitong-wei opened this issue Feb 20, 2024 · 1 comment

Comments

@qitong-wei
Copy link

Describe our question or idea
Hi everyone, i follow this guide https://github.com/carla-simulator/scenario_runner/blob/master/Docs/README_OpenSCENARIO_2.0.md to run the demo, but the terminal show "AttributeError: 'OSC2ScenarioConfiguration' object has no attribute 'route' 'OSC2ScenarioConfiguration' object has no attribute 'route' No more scenarios .... Exiting", please give me some advise, thanks.

Screenshots
image

Desktop (please complete the following information):

  • OS: [e.g. Ubuntu 20.04]
  • CARLA Version [e.g. CARLA 0.9.15]
  • Python version [e.g. 3.8.10]
  • Version [e.g. 0.9.15]
@gbenner
Copy link

gbenner commented Mar 22, 2024

Ran into same issue. Noticed OSC2ScenarioConfiguration did not chain up the init with super. Declaring __init__ in the child discards supers __init__ where the route variable is declared.

Calling super().__init__() adds those variables to the child class.

This seems to fix it.

# osc2_scenario_configuration.py
class OSC2ScenarioConfiguration(ScenarioConfiguration):
    def __init__(self, filename, client):
        super().__init__()```

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

2 participants