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

bash disabled or not supported with --local #829

Closed
ekg opened this issue Dec 11, 2023 · 11 comments
Closed

bash disabled or not supported with --local #829

ekg opened this issue Dec 11, 2023 · 11 comments
Labels
Bug Something isn't working

Comments

@ekg
Copy link

ekg commented Dec 11, 2023

Describe the bug

Using LMStudio with TheBloke/OpenHermes-2.5-Mistral-7B-16k-GGUF, I get:

> list the files in the current directory


                                                                                                                                                               
  ls                                                                                                                                                           
                                                                                                                                                               
                                                                                                                                                               
  `bash` disabled or not supported.                                                                                                                            
                                                                                                                                                               

How can I enable bash for --local?

Reproduce

Start up LMStudio, run the server.

interpreter --local -safe off

Expected behavior

The command should be run.

Screenshots

No response

Open Interpreter version

0.2.0

Python version

3.10.12

Operating System name and version

Ubuntu 22.04

Additional context

No response

@ekg ekg added the Bug Something isn't working label Dec 11, 2023
@ekg
Copy link
Author

ekg commented Dec 13, 2023

Any suggestions? Just a word or two about where to hack would speed me on my way to resolve this.

@SunnyOd
Copy link

SunnyOd commented Dec 28, 2023

Getting the same error here too. I'm using ollama with litellm and code-llama

I've tried to update the config.yaml to tell it the location of the bash binary and also explained that it's running on a Linux/Fedora machine but doesn't seem to pick up on that

@Notnaton
Copy link
Collaborator

https://github.com/KillianLucas/open-interpreter/tree/main/interpreter%2Fcore%2Fcomputer%2Fterminal%2Flanguages

Screenshot_20231229-004826.png

Instead of bash, make it use shell script as bash is not supported.

@SunnyOd
Copy link

SunnyOd commented Dec 29, 2023

Thanks @Notnaton. I normally run interpreter via a shell script so it sets up the conda environment, etc. The script was prefixed with #!/bin/bash before so I changed it to #!/bin/sh and tried running the script again but it still fails with:

`bash` disabled or not supported.   
`python` disabled or not supported. 

Am I setting shell up correctly?

Thanks!
S

@Notnaton
Copy link
Collaborator

Notnaton commented Dec 29, 2023

Can you run python in the command line environment?

Could you share the script you use?

@cavit99
Copy link

cavit99 commented Dec 29, 2023

I'm having the exact same issue.

@mexicanamerican
Copy link

I'm having the exact same issue.

Describe the bug

Using LMStudio with TheBloke/OpenHermes-2.5-Mistral-7B-16k-GGUF, I get:

> list the files in the current directory


                                                                                                                                                               
  ls                                                                                                                                                           
                                                                                                                                                               
                                                                                                                                                               
  `bash` disabled or not supported.                                                                                                                            
                                                                                                                                                               

How can I enable bash for --local?

Reproduce

Start up LMStudio, run the server.

interpreter --local -safe off

Expected behavior

The command should be run.

Screenshots

No response

Open Interpreter version

0.2.0

Python version

3.10.12

Operating System name and version

Ubuntu 22.04

Additional context

No response

Having the same issue

@Speedway1
Copy link

Same here. Got the same issue.

@Speedway1
Copy link

I have solved the bug and raised bug ticket #867. However, for those in a rush, here is a quick and dirty fix until the patch/bug fix is applied:

  1. go to your virtual environment where the "pip install" has installed the code (e.g. open_interpreter_env)
  2. edit the "respond.py" file, for example:
    vi open_interpreter_env/lib/python3.10/site-packages/interpreter/core/respond.py
  3. change the code that looks like this:
    # Is this language enabled/supported?
    if language not in [
    i.name.lower() for i in interpreter.computer.terminal.languages
    ]:
    output = f"{language} disabled or not supported."
    TO LOOK LIKE THIS:
    # Is this language enabled/supported?
    if language not in [
    i.name.lower() for i in interpreter.computer.terminal.languages
    ] and language != "bash":
    output = f"{language} disabled or not supported."

i.e. you are changing this line:
]:
to this:
] and language != "bash":
4) save (ZZ) and then restart "interpreter" and now your bash shell commands should work.

@SunnyOd
Copy link

SunnyOd commented Jan 4, 2024

Awesome news😎 Thank you!

@Manamama
Copy link

Lovely. Please fix it in the code. FYI, I had Claude look into this code once fixed (by me) to reexplain that logic: in short it is a double negative: "bash is not disabled anymore " then.

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

No branches or pull requests

8 participants