OpenInterpreter / open-interpreter

A natural language interface for computers
http://openinterpreter.com/
GNU Affero General Public License v3.0
52.22k stars 4.61k forks source link

[IPKernelApp] WARNING | Parent appears to have exited, shutting down. #1125

Closed kinopeee closed 5 months ago

kinopeee commented 5 months ago

Describe the bug

I updated to Open Interpreter 0.2.4. After that, it started to throw the following error when launched with the -v or -h options or when terminated with CTRL-C: [IPKernelApp] WARNING | Parent appears to have exited, shutting down.

Python 3.10.4 / macOS 14.4

Reproduce

Launch interpreter and press CTRL-C. Launch interpreter with option such as -v / -h.

Expected behavior

Exit interpreter without displaying an error message.

Screenshots

スクリーンショット 2024-03-24 17 57 37

Open Interpreter version

0.2.4

Python version

3.10.4

Operating System name and version

macOS 14.4(23E214)

Additional context

No response

Steve235lab commented 5 months ago

I got a traceback just after the [IPKernelApp] WARNING | Parent appears to have exited, shutting down. message a few days ago on macOS. However, the traceback only showed once but the [IPKernelApp] WARNING | Parent appears to have exited, shutting down. shows every time, so I am not sure if they are relative. Here's the traceback:

Traceback (most recent call last):
  File "/usr/local/bin/i", line 5, in <module>
    from interpreter.terminal_interface.start_terminal_interface import main
  File "/usr/local/lib/python3.11/dist-packages/interpreter/__init__.py", line 2, in <module>
    from .core.core import OpenInterpreter
  File "/usr/local/lib/python3.11/dist-packages/interpreter/core/core.py", line 15, in <module>
    from .computer.computer import Computer
  File "/usr/local/lib/python3.11/dist-packages/interpreter/core/computer/computer.py", line 8, in <module>
    from .display.display import Display
  File "/usr/local/lib/python3.11/dist-packages/interpreter/core/computer/display/display.py", line 21, in <module>
    plt = lazy_import("matplotlib.pyplot")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/interpreter/core/utils/lazy_import.py", line 11, in lazy_import
    spec = importlib.util.find_spec(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib.util>", line 94, in find_spec
  File "/usr/local/lib/python3.11/dist-packages/matplotlib/__init__.py", line 161, in <module>
    from . import _api, _version, cbook, _docstring, rcsetup
  File "/usr/local/lib/python3.11/dist-packages/matplotlib/rcsetup.py", line 27, in <module>
    from matplotlib.colors import Colormap, is_color_like
  File "/usr/local/lib/python3.11/dist-packages/matplotlib/colors.py", line 57, in <module>
    from matplotlib import _api, _cm, cbook, scale
  File "/usr/local/lib/python3.11/dist-packages/matplotlib/scale.py", line 22, in <module>
    from matplotlib.ticker import (
  File "/usr/local/lib/python3.11/dist-packages/matplotlib/ticker.py", line 143, in <module>
    from matplotlib import transforms as mtransforms
  File "/usr/local/lib/python3.11/dist-packages/matplotlib/transforms.py", line 46, in <module>
    from numpy.linalg import inv
  File "/usr/local/lib/python3.11/dist-packages/numpy/linalg/__init__.py", line 73, in <module>
    from . import linalg
  File "/usr/local/lib/python3.11/dist-packages/numpy/linalg/linalg.py", line 34, in <module>
    from numpy.lib.twodim_base import triu, eye
  File "/usr/local/lib/python3.11/dist-packages/numpy/lib/__init__.py", line 23, in <module>
    from . import index_tricks
  File "/usr/local/lib/python3.11/dist-packages/numpy/lib/index_tricks.py", line 12, in <module>
    import numpy.matrixlib as matrixlib
  File "/usr/local/lib/python3.11/dist-packages/numpy/matrixlib/__init__.py", line 4, in <module>
    from . import defmatrix
  File "/usr/local/lib/python3.11/dist-packages/numpy/matrixlib/defmatrix.py", line 12, in <module>
    from numpy.linalg import matrix_power
ImportError: cannot import name 'matrix_power' from partially initialized module 'numpy.linalg' (most likely due to a circular import) (/usr/local/lib/python3.11/dist-packages/numpy/linalg/__init__.py)

I was planning to solve this problem, but something bad happened recently and got me delayed.

Steve235lab commented 5 months ago

I got a traceback just after the [IPKernelApp] WARNING | Parent appears to have exited, shutting down. message a few days ago on macOS. However, the traceback only showed once but the [IPKernelApp] WARNING | Parent appears to have exited, shutting down. shows every time, so I am not sure if they are relative. Here's the traceback: ...

I think the import error in the traceback has been solved by @KillianLucas

de-g commented 5 months ago

Ok I will stop playing around. I dont know how to code but I am starting doing a lot of custom AI work and need to learn. Any recommendations for fast start training? thanks

filip-van-hoeckel commented 5 months ago

Having the same error, but on Windows. Tidbit that caught the attention "C:\laragon\bin\python\python-3.10\lib\site-packages\interpreter\core\llm\utils\convert_to_openai_messages.py", line 173, in convert_to_openai_messages new_message["content"] = new_message["content"].strip() AttributeError: 'list' object has no attribute 'strip' I basically have an unworkable Interpreter as in any setting and with every command it just crashes like this.

uz-g commented 5 months ago

I'm experiencing the same issue with Open Interpreter 0.2.4 New Computer Update on macOS Sonoma 14.3.1 (23D60). Whenever I run any command that requires Open Interpreter, such as executing Python code or running the interpreter from the terminal, I consistently encounter the following error message:

[IPKernelApp] WARNING | Parent appears to have exited, shutting down.

Even when I run stuff that doesn't require open interpreter to actually run code, it still shows the error. For example, when I check the version using the command interpreter --version, I get the following output:

(/Users/uz./uzCode/vacNAV/.conda) uz.@uzMacBookM3Pro ~ % interpreter --version
Open Interpreter 0.2.4 New Computer Update
(/Users/uz./uzCode/vacNAV/.conda) uz.@uzMacBookM3Pro ~ % [IPKernelApp] WARNING | Parent appears to have exited, shutting down.
[IPKernelApp] WARNING | Parent appears to have exited, shutting down.

It also happens in python code when I try to run anything with open interpreter For example, when I run this in python:

interpreter.chat("Open Arc")

It runs as normal but then I get this after:

[IPKernelApp] WARNING | Parent appears to have exited, shutting down.

Sometimes this happens and cuts off open interpreter so that it cannot run the code or complete the task I give it.

I don't see any other error messages or tracebacks apart from the "[IPKernelApp] WARNING | Parent appears to have exited, shutting down." message.

I have already tried reinstalling Open Interpreter and updating to the latest version, but the issue persists.

Please let me know if there are any known solutions or workarounds for this problem. Any assistance would be greatly appreciated.

uluckyXH commented 5 months ago

I also encountered this problem...I don't know how to solve it. It seems like the old version didn't have this issue, but it appeared after I upgraded. I have been unable to use it.

kinopeee commented 5 months ago

I updated macOS to 14.4.1(23E224). However, this phenomenon has not changed.

MikeBirdTech commented 5 months ago

This seems to be something with Python and/or Jupyter. We are taking a look. Unfortunately, this output is obfuscating other issues, so please check the output for other errors to make sure that you're reporting the correct thing. Thanks!

uz-g commented 5 months ago

Here is the latest error message I got:

[IPKernelApp] WARNING | Parent appears to have exited, shutting down.
[IPKernelApp] WARNING | Parent appears to have exited, shutting down.

        Python Version: 3.11.8
        Pip Version: 23.3.1
        Open-interpreter Version: cmd: Open Interpreter 0.2.4 New Computer Update
, pkg: 0.2.4
        OS Version and Architecture: macOS-14.3.1-arm64-arm-64bit
        CPU Info: arm
        RAM Info: 18.00 GB, used: 7.42, free: 0.40

        # Interpreter Info

        Vision: False
        Model: claude-3-haiku-20240307
        Function calling: None
        Context window: None
        Max tokens: None

        Auto run: True
        API base: None
        Offline: False

        Curl output: Not local

        # Messages
...
end system message

        {'role': 'user', 'type': 'message', 'content': 'open wikipedia'}

Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?a7ac37cf-96c8-42be-a0f0-00346451022a) or open in a [text editor](command:workbench.action.openLargeOutput?a7ac37cf-96c8-42be-a0f0-00346451022a). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
File [~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1132](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1132), in completion(model, messages, timeout, temperature, top_p, n, stream, stop, max_tokens, presence_penalty, frequency_penalty, logit_bias, user, response_format, seed, tools, tool_choice, logprobs, top_logprobs, deployment_id, extra_headers, functions, function_call, base_url, api_version, api_key, model_list, **kwargs)
   [1126](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1126)     api_base = (
   [1127](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1127)         api_base
   [1128](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1128)         or litellm.api_base
   [1129](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1129)         or get_secret("ANTHROPIC_API_BASE")
   [1130](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1130)         or "https://api.anthropic.com/v1/messages"
   [1131](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1131)     )
-> [1132](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1132)     response = anthropic.completion(
   [1133](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1133)         model=model,
   [1134](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1134)         messages=messages,
   [1135](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1135)         api_base=api_base,
   [1136](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1136)         custom_prompt_dict=litellm.custom_prompt_dict,
   [1137](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1137)         model_response=model_response,
   [1138](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1138)         print_verbose=print_verbose,
   [1139](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1139)         optional_params=optional_params,
   [1140](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1140)         litellm_params=litellm_params,
   [1141](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1141)         logger_fn=logger_fn,
   [1142](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1142)         encoding=encoding,  # for calculating input/output tokens
   [1143](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1143)         api_key=api_key,
   [1144](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1144)         logging_obj=logging,
   [1145](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1145)         headers=headers,
   [1146](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1146)     )
   [1147](https://file+.vscode-resource.vscode-cdn.net/Users/uz./uzCode/vacNAV/important/~/uzCode/vacNAV/.conda/lib/python3.11/site-packages/litellm/main.py:1147) if (
...
-> 8265             raise e
   8266         else:
   8267             raise original_exception

APIConnectionError: list index out of range

This also happens when i run the code in a normal python file without Jupyter.

Thanks in advance.

tyfiero commented 5 months ago

This is fixed once pull request 1145 is merged! It's not actually an error, just a message printed when Jupyter exits.