You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🐛 Bug Report: Missing Main Execution Block in interpreter.py
Description
The interpreter.py script lacks the main execution block (if __name__ == "__main__":) which is necessary to initiate the script's execution when run from the command line. Due to this omission, the script exits silently without any output or error messages when executed with command-line arguments.
🚶 Steps to Reproduce
Clone the repository and navigate to the directory containing interpreter.py.
Run the script from the command line with the --local flag (or any other flag): python interpreter.py --local.
Observe that the script exits silently without initiating the CLI or the chat process.
🤔 Expected Behavior
When the script is executed from the command line, it should initiate the CLI and subsequently the chat process, allowing the user to interact with the program.
😯 Actual Behavior
The script exits silently without any output or error messages, and the CLI or chat process is not initiated.
💡 Suggested Fix
Add the following block of code at the end of the interpreter.py script to initiate the script's execution when run as the main program:
"""
python
if name == "main":
interpreter = Interpreter()
interpreter.cli()
"""
The text was updated successfully, but these errors were encountered:
drgutman
changed the title
Missing Main Execution Block in interpreter.py
Missing Main Execution Block in interpreter.py 🐛
Sep 4, 2023
Hey @drgutman! I think the issue here might be running it with a command like interpreter.py --local instead of simply interpreter --local. The latter should use the script specified in pyproject.toml, which should put a script called "interpreter" in your default scripts folder when you pip install open-interpreter.
I'm not certain if this is always the case though. What happens if you try to run interpreter --local on your command line?
🐛 Bug Report: Missing Main Execution Block in
interpreter.py
Description
The
interpreter.py
script lacks the main execution block (if __name__ == "__main__":
) which is necessary to initiate the script's execution when run from the command line. Due to this omission, the script exits silently without any output or error messages when executed with command-line arguments.🚶 Steps to Reproduce
interpreter.py
.--local
flag (or any other flag):python interpreter.py --local
.🤔 Expected Behavior
When the script is executed from the command line, it should initiate the CLI and subsequently the chat process, allowing the user to interact with the program.
😯 Actual Behavior
The script exits silently without any output or error messages, and the CLI or chat process is not initiated.
💡 Suggested Fix
Add the following block of code at the end of the
interpreter.py
script to initiate the script's execution when run as the main program:"""
python
if name == "main":
interpreter = Interpreter()
interpreter.cli()
"""
The text was updated successfully, but these errors were encountered: