Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quitting an interpreter session with CTRL-D causes an ugly traceback #925

Closed
deeplook opened this issue Jan 15, 2024 · 3 comments · Fixed by #1456
Closed

Quitting an interpreter session with CTRL-D causes an ugly traceback #925

deeplook opened this issue Jan 15, 2024 · 3 comments · Fixed by #1456
Labels
Bug Something isn't working

Comments

@deeplook
Copy link

Describe the bug

Quitting an interpreter session with CTRL-D instead of CTRL-C causes an ugly traceback.

Reproduce

Enter interpreter in a terminal.
Wait for the > prompt.
Enter CTRL-D.

Expected behavior

Gracefully quitting the session for CTRL-D like with CTRL-C, although the welcome message mentions only CTRL-C.

Screenshots

% interpreter

▌ Model set to gpt-4

Open Interpreter will require approval before running code.

Use interpreter -y to bypass this.

Press CTRL-C to exit.

> Traceback (most recent call last):
  File "/Users/foobar/miniconda3/envs/oi-env/bin/interpreter", line 8, in <module>
    sys.exit(interpreter.start_terminal_interface())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/foobar/miniconda3/envs/oi-env/lib/python3.11/site-packages/interpreter/core/core.py", line 25, in start_terminal_interface
    start_terminal_interface(self)
  File "/Users/foobar/miniconda3/envs/oi-env/lib/python3.11/site-packages/interpreter/terminal_interface/start_terminal_interface.py", line 684, in start_terminal_interface
    interpreter.chat()
  File "/Users/foobar/miniconda3/envs/oi-env/lib/python3.11/site-packages/interpreter/core/core.py", line 86, in chat
    for _ in self._streaming_chat(message=message, display=display):
  File "/Users/foobar/miniconda3/envs/oi-env/lib/python3.11/site-packages/interpreter/core/core.py", line 113, in _streaming_chat
    yield from terminal_interface(self, message)
  File "/Users/foobar/miniconda3/envs/oi-env/lib/python3.11/site-packages/interpreter/terminal_interface/terminal_interface.py", line 78, in terminal_interface
    message = input("> ").strip()
              ^^^^^^^^^^^
EOFError

Open Interpreter version

0.2.0

Python version

3.11.7

Operating System name and version

macOS 13.6.4 (arm M1)

Additional context

No response

@deeplook deeplook added the Bug Something isn't working label Jan 15, 2024
@bigrig2212
Copy link

In general, would be nice to have a 'stop generating' command - that didn't quit out as well.

@deeplook
Copy link
Author

In general, would be nice to have a 'stop generating' command - that didn't quit out as well.

Sounds like this would qualify as a separate ticket.

@MikeBirdTech
Copy link
Contributor

Hi @deeplook
Thanks for opening the issue.
If a PR is made for this, we will review it, but seeing as CTRL-C works as expected, this will not be a priority. Thanks!

erhhung added a commit to erhhung/open-interpreter that referenced this issue Sep 13, 2024
KillianLucas added a commit that referenced this issue Sep 26, 2024
Fixes #925: Exiting by Ctrl-D throws EOFError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants