Closed KrisshRp closed 11 months ago
Please have a look at the TROUBLESHOOTING section, the reason you get this error is because of IP location restriction, try using a VPN connected to US/UK. Other locations may work sporadically or not work at all.
Closing this.
same,But my web works fine using VPN,And other methods of unofficial-claude2-api can also be used, except for send_ Message
I have tested with a server located in the US and it's not working...I get the same error
Have you tried updating your session cookie from time to time? Also are you using the automatic session gathering with selenium, or the manual alternative?
manual
------------------ Original ------------------ From: Stefano Raneri @.> Date: Tue,Nov 14,2023 8:02 PM To: st1vms/unofficial-claude2-api @.> Cc: Yang KaiQi @.>, Comment @.> Subject: Re: [st1vms/unofficial-claude2-api] Request failed with status code:403 (Issue #5)
Have you tried updating your session cookie from time to time? Also are you using the automatic session gathering with selenium, or the manual alternative?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
manual … ------------------ Original ------------------ From: Stefano Raneri @.> Date: Tue,Nov 14,2023 8:02 PM To: st1vms/unofficial-claude2-api @.> Cc: Yang KaiQi @.>, Comment @.> Subject: Re: [st1vms/unofficial-claude2-api] Request failed with status code:403 (Issue #5) Have you tried updating your session cookie from time to time? Also are you using the automatic session gathering with selenium, or the manual alternative? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Did you verified if cookie expired? You could give a shot to selenium auto session retrieval, also trying to run the example snippet to see if it works out...
@KrisshRp @XiaoXinYo @laserman2000
Version 0.2.2 was released today, the 403 error seems to be fixed, also the library was updated to reflect new Claude 2.1 model!
Please let me know if this solves your issues...
now i get
curl_cffi.requests.errors.RequestsError: Failed to perform, ErrCode: 77, Reason: 'error setting certificate verify locations: CAfile: C:\Users\xxy\Documents\123\venv\Lib\site-packages\curl_cffi\cacert.pem CApath: none'. This may be a libcurl error, See https://curl.se/libcurl/c/libcurl-errors.html first for more details.
@XiaoXinYo It may be a conflicting version of curl_cffi
.
Have you tried clean reinstalling the libraries? ( in both virtual env and system packages ). So like issue this command in and outside the virtual env...
python -m pip uninstall unofficial-claude2-api curl_cffi
Then when you want to reinstall them, first upgrade curl_cffi
:
python -m pip install --upgrade curl_cffi
Then reinstall this library:
python -m pip install unofficial-claude2-api
Also try a reboot after doing that...
If this doesn't work for you, would you please share your system informations? Such as OS, browsers installed, python version...
@st1vms I have reinstalled all the packages, but still reported an error, regardless of whether I am using VPN or not
@st1vms I manually get the cookies and ua Python3.11 Windows11 Edge 120.0.2210.61
Looking at the libcurl error code reference page, this error seems to be:
CURLE_SSL_CACERT_BADFILE (77)
Problem with reading the SSL CA cert (path? access rights?)
Have you tried installing and running outside virtual environment?
Cause the error states that the cafile.pem is not accessible, may be a problem on how curl_cffi interacts with virtual environments, or even a lack of permissions.
Also don't know if it may help, but try installing Firefox and reboot...
@st1vms I don't think this is a problem caused by permissions (I have used administrator permissions) In addition, there is an error in the import of example. It should be from claude2_api.xxx
Ok, thanks for spotting those typoos...
Have you tried the resolution steps I suggested before?
I'm ready to rest. I'll get back to you tomorrow.
I tried the method you gave me, but it still didn't work
C:\Users\xxy\Documents\123\venv\Lib\site-packages\curl_cffi\cacert.pem
This file should be included in the curl_cffi
library folder in your virtual environment site-packages, please could you walk along the path directories taken from that path the error returned, trying to find cacert.pem
?
Can be found
@XiaoXinYo Can you please try these steps to update libcurl on Windows?
Please post the output of
curl --version
I would also suggest to delete and reinstall python3.11, when installing also do not check any box rather than "Add to PATH".
When installing python packages please do not use a virtual environment and also retain from using the Admin shell.
Let me know for any further updates on this issue...
Thanks for your patience
Thank you, it was unexpectedly resolved
raise RuntimeError(f"Cannot retrieve Organization ID!\n{response.text}") RuntimeError: Cannot retrieve Organization ID! {"error": {"type": "permission_error", "message": "We are unable to serve your request"}}