-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Bug Description
After generating a new logos-project and choosing to test an example, the program fails with NameError: name 'sys' is not defined.
Environment
- OS: macOS (Darwin 24.6.0)
- Python: 3.13
- model-checker version: 1.1.0
- Installation method: pip3 install model-checker
Steps to Reproduce
- Install model-checker:
pip3 install model-checker - Run:
model-checker - When prompted "Would you like to generate a new logos-project? (y/n):", enter:
y - Enter a project name (e.g., "new")
- When prompted "Would you like to test an example in your project? (y/n):", enter:
y
Expected Behavior
The example should run successfully, demonstrating the model-checker functionality.
Actual Behavior
The program fails with the following error:
◆ Documents ❯❯❯ model-checker
Would you like to generate a new logos-project? (y/n): y
Enter the name of your project using snake_case: new
Project generated at: /Users/nicky/Documents/project_new
Project structure:
└── project_new/
├── .modelchecker
├── CITATION.md
├── LICENSE.md
├── README.md
├── TODO.md
├── __init__.py
├── examples.py
├── iterate.py
├── operators.py
├── semantic.py
├── docs/
│ ├── API_REFERENCE.md
│ ├── ARCHITECTURE.md
│ ├── ITERATE.md
│ ├── README.md
│ ├── SETTINGS.md
│ └── USER_GUIDE.md
├── subtheories/
│ ├── README.md
│ ├── __init__.py
│ ├── constitutive
│ ├── counterfactual
│ ├── extensional
│ ├── modal
│ └── relevance
└── tests/
├── README.md
├── __init__.py
├── conftest.py
├── integration
└── unit
Would you like to test an example in your project? (y/n): y
Running example: /Users/nicky/Documents/project_new/examples.py
Unexpected error: name 'sys' is not defined
You can run it manually with: model-checker /Users/nicky/Documents/project_new/examples.py
Root Cause
The generated examples.py file appears to be missing an import sys statement, or there's an issue with how the example is being executed that prevents the sys module from being available.
Additional Context
This issue occurs immediately after project generation, suggesting the template files may have missing imports or there's an execution environment issue. The project structure is generated correctly, but the example execution fails.
Suggested Investigation
- Check the contents of the generated
examples.pyfile for missing imports - Verify the execution context when running examples
- Ensure all necessary imports are included in template files
Metadata
Metadata
Assignees
Labels
No labels