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

Command stuck when running CLI or AppleScript on Mac

Open brstream opened this issue 3 months ago • 3 comments

Describe the bug

Thank you for this revolutionary software! Over the past few days I have done my best to see what I am doing wrong on my end. Every time the interpreter suggests running a CLI program on the Mac, or AppleScript, it gets stuck--for hours. Strangely, running Python code works. I've tried giving both kitty (the terminal software I use) and the built-in terminal program access to everything. MacOS usually puts up a dialog box when a folder is being accessed which is restricted. In short, interpreter sticks on trying to run any CLI command or AppleScript, and only works when running straight Python code. How to fix this?

Reproduce

  1. Run "interpreter"
  2. Enter "Give me a list of files on the desktop"
  3. Interpreter proposes "ls /Users/brstream/Desktop"
  4. A circular cursor after the proposed code stays, and the program sticks indefinitely.
  5. CTRL-C breaks out of the stuck program.
  6. Interpreter, after the traceback from a Keyboard Interrupt, says "It seems that the command to list files on the desktop is taking too long to execute. Let me try a different approach."
  7. Interpreter proposes "import os files = os.listdir('/Users/brstream/Desktop') files"
  8. Code runs quickly and as expected.

Expected behavior

  1. Run "interpreter"
  2. Enter "Give me a list of files on the desktop"
  3. Interpreter proposes "ls /Users/brstream/Desktop"
  4. Command runs quickly and as expected, giving the output of the "ls" command for the Desktop folder.

Screenshots

Screenshot 2024-04-07 at 10 48 44 AM

Open Interpreter version

0.2.4

Python version

3.9.19

Operating System name and version

macOS 14.2.1

Additional context

I use fish shell, but have reproduced the same problem on zsh.

brstream avatar Apr 07 '24 17:04 brstream

I created a similar project myself, although it's quite basic and not as advanced as this one. When I saw your post, I wanted to see how my assistant would handle it, and surprisingly, he did well 😎 I can relate to experiencing similar issues. If cmd didn't work on the first try, it would error out. For now, my solution is to feed him the error message and instruct him to come up with a solution based on the error. It has worked for small issues.

Uploading assistant.mov…

MemeFormer avatar Apr 07 '24 20:04 MemeFormer

https://streamable.com/0wncy7

MemeFormer avatar Apr 07 '24 21:04 MemeFormer

Also happening to me on Void Linux, same freeze spot

twilight-sparkle-irl avatar Apr 10 '24 03:04 twilight-sparkle-irl