AshwinPathi / claude-api-py

Unofficial Python API for Anthropic's Claude LLM
https://pypi.org/project/claude-api-py/
MIT License
108 stars 11 forks source link

can't get organizations uuid info when I ran the example.py #21

Open godblessbb opened 10 months ago

godblessbb commented 10 months ago

Traceback (most recent call last): File "/Users/bicaihua/PycharmProjects/Weibo/weibo-crawler/Claude_Copilot.py", line 109, in main() File "/Users/bicaihua/PycharmProjects/Weibo/weibo-crawler/Claude_Copilot.py", line 30, in main claude_obj = claude_wrapper.ClaudeWrapper(client, organizations[0]['uuid']) # type: ignore TypeError: 'NoneType' object is not subscriptable

error like above. how to solve this?

Randomboiii03 commented 10 months ago

the owner is trying to fix the error, for sometime try this: https://github.com/KoushikNavuluri/Claude-API

st1vms commented 10 months ago

Hello, I recently improved the existing solutions, by fixing header consistency, adding auto session gathering using Firefox login and selenium, and auto user agent retrieval along with timezone.

My unofficial version of the API does currently work like a charm, it supports chat creation/deletion/retrieval and messages with attachments (with all the supported file types). It also let you handle a MessageRateLimit exception that provides you with the amount of seconds to sleep before next rateReset.

Come have a try! Leave a :star: if you can : )

https://github.com/st1vms/unofficial-claude2-api

AshwinPathi commented 4 months ago

@godblessbb @Randomboiii03 let me know if it works now. Usually its a problem with headers/cookies.