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

anthropic.APIStatusError

Open austinmw opened this issue 1 year ago • 1 comments

Describe the bug

I'm getting a anthropic.APIStatusError when using --os:

This action is restricted for safety reasons at this time.

Reproduce

interpreter --os -y

Welcome to Open Interpreter.

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

▌ Model set to Claude 3.5 Sonnet (New), OS control enabled

Tip: Reduce display resolution for better performance.

Warning: This AI has full system access and can modify files, install software, and execute commands. By continuing, you accept all risks
and responsibility.

Move your mouse to any corner of the screen to exit.

> open spotify

I'll help you open Spotify using Spotlight search on Mac OS. I'll use Command+Space to open Spotlight, type "Spotify", and press Return.

{"action": "key", "text": "command+space"}{"action": "type", "text": "Spotify"}{"action": "key", "text": "Return"}Traceback (most recent call last):
  File "/Users/austinwelch/mambaforge/envs/py312/bin/interpreter", line 5, in <module>
    from interpreter.terminal_interface.start_terminal_interface import main
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/site-packages/interpreter/__init__.py", line 54, in <module>
    run_async_main()
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/site-packages/interpreter/computer_use/loop.py", line 528, in run_async_main
    asyncio.run(main())
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/site-packages/interpreter/computer_use/loop.py", line 505, in main
    async for chunk in sampling_loop(
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/site-packages/interpreter/computer_use/loop.py", line 165, in sampling_loop
    for chunk in raw_response:
                 ^^^^^^^^^^^^
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/site-packages/anthropic/_streaming.py", line 68, in __iter__
    for item in self._iterator:
                ^^^^^^^^^^^^^^
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/site-packages/anthropic/_streaming.py", line 110, in __stream__
    raise self._client._make_status_error(
anthropic.APIStatusError: {'type': 'error', 'error': {'details': None, 'type': 'invalid_request_error', 'message': 'This action is restricted for safety reasons at this time.'}}

Expected behavior

No error

Screenshots

No response

Open Interpreter version

0.4.3

Python version

3.12

Operating System name and version

MacOS 15

Additional context

No response

austinmw avatar Oct 29 '24 10:10 austinmw

@austinmw does this happen every time?

It's a restriction from Anthropic, out of our control, but if it happens an abnormal amount for you, we can investigate

MikeBirdTech avatar Oct 29 '24 19:10 MikeBirdTech