open-interpreter icon indicating copy to clipboard operation
open-interpreter copied to clipboard

bash disabled or not supported with --local

Open ekg opened this issue 1 year ago • 10 comments

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 avatar Dec 11 '23 23:12 ekg

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

ekg avatar Dec 13 '23 21:12 ekg

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

SunnyOd avatar Dec 28 '23 17:12 SunnyOd

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.

Notnaton avatar Dec 28 '23 23:12 Notnaton

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

SunnyOd avatar Dec 29 '23 10:12 SunnyOd

Can you run python in the command line environment?

Could you share the script you use?

Notnaton avatar Dec 29 '23 13:12 Notnaton

I'm having the exact same issue.

cavit99 avatar Dec 29 '23 15:12 cavit99

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

mexicanamerican avatar Dec 30 '23 12:12 mexicanamerican

Same here. Got the same issue.

Speedway1 avatar Jan 03 '24 21:01 Speedway1

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.

Speedway1 avatar Jan 03 '24 22:01 Speedway1

Awesome news😎 Thank you!

SunnyOd avatar Jan 04 '24 00:01 SunnyOd

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.

Manamama avatar Apr 10 '24 14:04 Manamama