BerkeleyLearnVerify / Scenic

A compiler and scenario generator for the Scenic scenario description language.
https://scenic-lang.org/
Other
271 stars 93 forks source link

ModuleNotFoundError: No module named 'scenic.simulators.carla.blueprints' #155

Closed axelbr closed 1 year ago

axelbr commented 1 year ago

Hello, when trying to import scenic.simulators.carla, it will throw a ModuleNotFoundError. I am using python3.8 with your main branch.

This happens everytime when I try to import the carla simulator package (scenic.simulators.carla).

Error trace:

File ".venv/lib/python3.8/site-packages/scenic/simulators/carla/__init__.py", line 21, in <module>
    from .simulator import CarlaSimulator
File ".venv/lib/python3.8/site-packages/scenic/simulators/carla/simulator.py", line 21, in <module>
    from scenic.simulators.carla.blueprints import oldBlueprintNames
axelbr commented 1 year ago

It looks like python can not import .scenic files, even when they are valid python syntax. Renaming blueprints.scenic to blueprints.py fixes this issue.

dfremont commented 1 year ago

Thanks for catching this, Axel! We indeed recently banned importing Scenic modules from Python (it was always a risky proposition) and forgot to change this code to compensate. We'll work on a fix.

dfremont commented 1 year ago

Fixed in #158.

axelbr commented 1 year ago

Cool, thank you!