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

Unable to find why I am getting Internal server error #202

Open
bhargavkumar1612 opened this issue Dec 4, 2024 · 1 comment
Open

Unable to find why I am getting Internal server error #202

bhargavkumar1612 opened this issue Dec 4, 2024 · 1 comment

Comments

@bhargavkumar1612
Copy link

bhargavkumar1612 commented Dec 4, 2024

I am using the computer use demo and keep running into this issue

File "/home/computeruse/computer_use_demo/loop.py", line 133, in sampling_loop
    raw_response = client.beta.messages.with_raw_response.create(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_legacy_response.py", line 377, in wrapped
    return cast(LegacyAPIResponse[R], func(*args, **kwargs))
                                      ^^^^^^^^^^^^^^^^^^^^^

  File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_utils/_utils.py", line 275, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^

  File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/resources/beta/messages/messages.py", line 898, in create
    return self._post(
           ^^^^^^^^^^^

  File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_base_client.py", line 1277, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_base_client.py", line 954, in request
    return self._request(
           ^^^^^^^^^^^^^^

  File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_base_client.py", line 1058, in _request
    raise self._make_status_error_from_response(err.response) from None

anthropic.InternalServerError: Error code: 500 - {'type': 'error', 'error': {'type': 'api_error', 'message': 'Internal server error'}}

The same api key works with a script but when I use it in the with the docker computer use demo instance its throwing the above error
Can anyone diagnose this and tell me how to resolve this issue?

@piyushmittal20
Copy link

Hey, You can try building your own docker image by changing enable_prompt_caching = False in code and then run the container. You can see this issue thread, people are discussing same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants