Skip to content

Scenic File Name Causes InvalidScenarioError #416

@Eric-Vin

Description

@Eric-Vin

System Details

  1. Python 3.11.11
  2. Scenic 3.1.0a1 (Main branch as of commit 20292f3)
  3. Apple M4 26.0.1
  4. 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

Metadata

Metadata

Assignees

Labels

low riskIssue has minimal impacts of future releasesstatus: validIssue is valid and will be worked ontype: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions