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
System Details
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:
Run with command:
scenic --2d NAME.scenic(NAME is important, see steps to reproduce).Error:
InvalidScenarioError: Scenic world model itself uses the "model" statementSteps To Reproduce
First create a file called
foo.scenicin the top level Scenic directory. Runningscenic --2d foo.scenicresults in no error.Rename the file to
metadrive.scenic. Runningscenic --2d metadrive.scenicresults in the error above.Copy the file and rename one to
foo.scenic, so that there are two identical files with the namesfoo.scenicandmetadrive.scenic. Runningscenic --2d foo.scenicorscenic --2d metadrive.scenicresults in the above error, even thoughfoo.scenicdoes not referencemetadrive.scenicat all.Issue Submission Checklist