-
Notifications
You must be signed in to change notification settings - Fork 135
Description
System Details
- Python 3.11.11
- Scenic 3.1.0a1 (Main branch as of commit 20292f3)
- Apple M4 26.0.1
- NA
Detailed Description
The name of a scenic file can cause a conflict resulting in an InvalidScenarioError. I have reproduced this bug only with Metadrive, though it may affect other models/simulators.
Scenic File in Question:
param map = localPath('assets/maps/CARLA/Town01.xodr')
param use2DMap = True
model scenic.simulators.metadrive.model
ego = new Car
Run with command: scenic --2d NAME.scenic (NAME is important, see steps to reproduce).
Error: InvalidScenarioError: Scenic world model itself uses the "model" statement
Steps To Reproduce
First create a file called foo.scenic in the top level Scenic directory. Running scenic --2d foo.scenic results in no error.
Rename the file to metadrive.scenic. Running scenic --2d metadrive.scenic results in the error above.
Copy the file and rename one to foo.scenic, so that there are two identical files with the names foo.scenic and metadrive.scenic. Running scenic --2d foo.scenic or scenic --2d metadrive.scenic results in the above error, even though foo.scenic does not reference metadrive.scenic at all.
Issue Submission Checklist
- I am reporting an issue, not asking a question
- I checked the open and closed issues, forum, etc. and have not found any solution
- I have provided all necessary code, etc. to reproduce the issue