The access to my zammad system works with curl. The following request results in a correct answer:
curl -H "Authorization: Token token=<user-token>" https://<url>/api/v1/users
However, the equivalent Python implementation zammad_py don't work.
from zammad_py import ZammadAPI
client = ZammadAPI(url=HOST, http_token=api_token)
# Example: Access all users
this_page = client.user.all()
for user in this_page:
print(user)
The previous python code results in an ssl-error.
requests.exceptions.SSLError: HTTPSConnectionPool(host=<url>, port=443): Max retries exceeded with url: /users/me (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)')))
In addition, curl -v https://<url>
shows no errors or warnings.
Does anyone have an idea?
The access to my zammad system works with curl. The following request results in a correct answer:
curl -H "Authorization: Token token=<user-token>" https://<url>/api/v1/users
However, the equivalent Python implementation zammad_py don't work.
from zammad_py import ZammadAPI
client = ZammadAPI(url=HOST, http_token=api_token)
# Example: Access all users
this_page = client.user.all()
for user in this_page:
print(user)
The previous python code results in an ssl-error.
requests.exceptions.SSLError: HTTPSConnectionPool(host=<url>, port=443): Max retries exceeded with url: /users/me (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)')))
In addition, curl -v https://<url>
shows no errors or warnings.
Does anyone have an idea?
Share Improve this question asked Nov 20, 2024 at 11:17 Thomas KThomas K 7611 bronze badges1 Answer
Reset to default 0I found the solution, zammad-py does not support ssl so far. However, I added an SSLAdapter to the zammad-py code and now it works. I created also an issue (enter link description here) for this improvement.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742362305a4429628.html
评论列表(0条)