在尝试访问云托管应用程序https://www.quickbase.com/时,我需要帮助验证公司防火墙内的 SSL 证书。当我在家运行脚本时,pyquickbase 模块可以完美运行。这是我的代码和回溯供您参考。
### Python script to log into database
import quickbase
client = quickbase.Client(username='JohnDoe',password='OpenQB', database='qb_database',
apptoken='xxxdfdafd', base_url="https://www.quickbase.com")
response = client.list_db_pages(database='qb_database')
print(response)
###
回溯(最近一次通话最后):
File "D:\Users\User123\Documents\pyfund\Quickbase\QB_api_check.py", line 3, in <module>
apptoken='xxxdfdafd', base_url="https://www.quickbase.com")
File "C:\Python27\lib\site-packages\quickbase.py", line 191, in __init__
self.authenticate()
File "C:\Python27\lib\site-packages\quickbase.py", line 263, in authenticate
required=['ticket', 'userid'], ticket=False)
File "C:\Python27\lib\site-packages\quickbase.py", line 219, in request
request = requests.post(url, data, headers=headers)
File "C:\Python27\lib\site-packages\requests\api.py", line 111, in post
return request('post', url, data=data, json=json, **kwargs)
File "C:\Python27\lib\site-packages\requests\api.py", line 57, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 585, in send
r = adapter.send(request, **kwargs)
File "C:\Python27\lib\site-packages\requests\adapters.py", line 477, in send
raise SSLError(e, request=request)
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)