-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
APIConnectionError: Connection error. #85
Comments
I had the same error message and found more info in the logs in terminal where I started the container: Turns out I had a trailing space when I pasted my API key. |
@rvadhavk - Thanks for the feedback. I prune all my containers from docker and re-ran bash script without any trailing spaces. Unfortunately - the same issue is happening :( - I did tried to do a |
@TechieHank are you on a network that has a firewall/proxy that re-encrypts traffic? Regardless, I updated the latest image with a more verbose error log - can you post the traceback after doing a |
Are you using an intranet? |
@x5a - Here's the Traceback after doing an update of the image: File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/httpx/_transports/default.py", line 72, in map_httpcore_exceptions File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/httpx/_transports/default.py", line 236, in handle_request File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 216, in handle_request File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 196, in handle_request File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/httpcore/_sync/connection.py", line 99, in handle_request File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/httpcore/_sync/connection.py", line 76, in handle_request File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/httpcore/_sync/connection.py", line 154, in _connect File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/httpcore/_backends/sync.py", line 152, in start_tls File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/contextlib.py", line 155, in exit File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions httpcore.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_base_client.py", line 990, in _request File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/httpx/_client.py", line 926, in send File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/httpx/_client.py", line 954, in _send_handling_auth File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/httpx/_client.py", line 991, in _send_handling_redirects File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/httpx/_client.py", line 1027, in _send_single_request File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/httpx/_transports/default.py", line 235, in handle_request File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/contextlib.py", line 155, in exit File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/httpx/_transports/default.py", line 89, in map_httpcore_exceptions httpx.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/computeruse/computer_use_demo/loop.py", line 132, in sampling_loop File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_legacy_response.py", line 377, in wrapped File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_utils/_utils.py", line 274, in wrapper File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/resources/beta/messages/messages.py", line 896, in create File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_base_client.py", line 1277, in post File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_base_client.py", line 954, in request File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_base_client.py", line 1014, in _request File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_base_client.py", line 1092, in _retry_request File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_base_client.py", line 1014, in _request File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_base_client.py", line 1092, in _retry_request File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_base_client.py", line 1024, in _request anthropic.APIConnectionError: Connection error. |
Thanks for the feedback @moo1o - What command did you use to update it? I assume you did the update inside the container Debian VM? |
@TechieHank
|
Having a somewhat similar error while using the Docker container, but it only occurs intermittently, and I can rerun in the same container and it starts working again - so isn't a general failure. Any idea why this might only happen intermittently, and what I can do to fix it for the Docker container?
|
Guys... I tried everything without sucess. having the same error. Seems to be a problem with the container. |
|
Same error, tried using solution from this thread but nothing works |
same error today |
I have installed the docker image and I have tested that my via curl and my API key can talk to Anthropic. When I run the docker container, noVNC starts and I can even browse the web, but when I run a prompt for the API to work, I get this error message:
File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
result = func()
^^^^^^
File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec
exec(code, module.dict)
File "/home/computeruse/computer_use_demo/streamlit.py", line 357, in
asyncio.run(main())
File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/computeruse/computer_use_demo/streamlit.py", line 213, in main
st.session_state.messages = await sampling_loop(
^^^^^^^^^^^^^^^^^^^^
Thanks in advance for guidance on how to fix this issue.
The text was updated successfully, but these errors were encountered: