GithubHelp home page GithubHelp logo

Comments (5)

AshwinPathi avatar AshwinPathi commented on July 28, 2024

Can you paste the full error log? You might need to use a VPN if you are connecting from outside of the US.

from claude-api-py.

linkedlist771 avatar linkedlist771 commented on July 28, 2024

Here is the detailed output, I have masked the private part, please check it out:

URL: https://claude.ai/api/organizations/a86bb297-4290-4ff6-a3d8-50bbd063e687/chat_conversations/4aff8cbd-32c3-49c9-8d33-06e389163748/completion
Traceback (most recent call last):
  File "/root/GitHubProject/claude_api/example.py", line 116, in <module>
    main()
  File "/root/GitHubProject/claude_api/example.py", line 44, in main
    new_convo_response = claude_obj.start_new_conversation("New Conversation", "Hi Claude!", model=model)
  File "/root/GitHubProject/claude_api/claude/claude_wrapper.py", line 103, in start_new_conversation
    send_init_message_result = self._client.send_message(
  File "/root/GitHubProject/claude_api/claude/claude_client.py", line 72, in send_message
    for elem in self._send_message(
  File "/root/GitHubProject/claude_api/claude/claude_client.py", line 341, in _send_message
    for streamed_data_chunk in custom_requests.sse(
  File "/root/GitHubProject/claude_api/claude/custom_requests.py", line 213, in sse
    client = sseclient.SSEClient(response)
  File "/root/miniconda3/lib/python3.9/site-packages/sseclient.py", line 48, in __init__
    self._connect()
  File "/root/miniconda3/lib/python3.9/site-packages/sseclient.py", line 56, in _connect
    self.resp = requester.get(self.url, stream=True, **self.requests_kwargs)
  File "/root/miniconda3/lib/python3.9/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "/root/miniconda3/lib/python3.9/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/root/miniconda3/lib/python3.9/site-packages/requests/sessions.py", line 575, in request
    prep = self.prepare_request(req)
  File "/root/miniconda3/lib/python3.9/site-packages/requests/sessions.py", line 486, in prepare_request
    p.prepare(
  File "/root/miniconda3/lib/python3.9/site-packages/requests/models.py", line 368, in prepare
    self.prepare_url(url, params)
  File "/root/miniconda3/lib/python3.9/site-packages/requests/models.py", line 439, in prepare_url
    raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL '<http.client.HTTPResponse object at 0x7f6b0240e820>': No scheme supplied. Perhaps you meant https://<http.client.HTTPResponse object at 0x7f6b0240e820>?
(base) [root@almalinux-8 claude_api]# curl ipinfo.io
{
  "ip": "198xxxx34",
  "hostname": "198-xxx-34-host.colocrossing.com",
  "city": "Buffalo",
  "region": "New York",
  "country": "US",
  "loc": "42.8865,-78.8784",
  "org": "AS36352 HostPapa",
  "postal": "14202",
  "timezone": "America/New_York",
  "readme": "https://ipinfo.io/missingauth"

from claude-api-py.

AshwinPathi avatar AshwinPathi commented on July 28, 2024

This looks like a different error? Could you try using your native request headers instead and try a new cookie?

from claude-api-py.

linkedlist771 avatar linkedlist771 commented on July 28, 2024

I've encountered a new issue when attempting to execute a script in my environment. The error log is as follows:

(base) [root@almalinux-8 claude_api]# python example.py
[16-Mar-24 11:40:48:root:WARNING][claude_client.py:304 - get_organizations() ] Failed response object: Response(ok=False, data=b'', status_code=None, error='HTTP Error 403: Forbidden')
Traceback (most recent call last):
  File "/root/GitHubProject/claude_api/example.py", line 116, in <module>
    main()
  File "/root/GitHubProject/claude_api/example.py", line 31, in main
    claude_obj = claude_wrapper.ClaudeWrapper(client, organizations[0]['uuid']) # type: ignore
TypeError: 'NoneType' object is not subscriptable

It appears I'm unable to retrieve my organization's information now. Can you reproduct it?

from claude-api-py.

AshwinPathi avatar AshwinPathi commented on July 28, 2024

Usually this happens when you get banned

from claude-api-py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.