gpt4 book ai didi

python - 错误 "pyral.context.RallyRESTAPIError: SSL certificate verification failed"

转载 作者:行者123 更新时间:2023-11-28 18:31:37 24 4
gpt4 key购买 nike

尝试从公司文件墙后面使用 pyral 1.1.1 和 ActivePython 2.7.10.12 (ActiveState Software Inc.) 通过 Web 服务 API v2.0 访问 rally1.rallydev.com。我收到错误消息“pyral.context.RallyRESTAPIError:SSL 证书验证失败”

Using Code with ssl: 

rally = Rally(server, user, password, workspace=workspace, project=project)

Receive:

Traceback (most recent call last):
File "C:\Users\QvaleL\Documents\Eclipse Workspace\Extract Rally Data\PullRallyUS - Working.py", line 26, in <module>
rally = Rally(server, user, password, workspace=workspace, project=project)
File "C:\Python27\lib\site-packages\pyral\restapi.py", line 228, in __init__
self.contextHelper.check(self.server)
File "C:\Python27\lib\site-packages\pyral\context.py", line 216, in check
raise RallyRESTAPIError(problem)
pyral.context.RallyRESTAPIError: SSL certificate verification failed



Using Code to turn off SSL:

rally = Rally(server, user, password, workspace=workspace, project=project, verify_ssl_cert=False)

Receive:

C:\Python27\lib\site-packages\requests\packages\urllib3\connectionpool.py:791: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
404 Response for request
('Connection aborted.', BadStatusLine("''",))

Traceback (most recent call last):
File "C:\Users\QvaleL\Documents\Eclipse Workspace\Extract Rally Data\PullRallyUS - Working.py", line 25, in <module>
rally = Rally(server, user, password, workspace=workspace, project=project, verify_ssl_cert=False)
File "C:\Python27\lib\site-packages\pyral\restapi.py", line 228, in __init__
self.contextHelper.check(self.server)
File "C:\Python27\lib\site-packages\pyral\context.py", line 216, in check
raise RallyRESTAPIError(problem)
pyral.context.RallyRESTAPIError: 404 Target host: 'rally1.rallydev.com' doesn't support the Rally WSAPI

已安装的 Python 包

c:\>pip list
certifi (2016.2.28)
pip (8.1.1)
pypm (1.4.3)
pyral (1.1.1)
pythonselect (1.3)
pywin32 (218.3)
requests (2.9.1)
setuptools (5.2)
virtualenv (1.11.6)

最佳答案

解决方案是在您的环境中或通过 Python 程序导出环境变量 https_proxy=[您的 https proxy-server_IP:port]。要从 Python 程序中导出,请使用以下带有 [your https proxy-server_IP:port] 的命令语法:

os.environ['https_proxy'] = '100.100.101.200:8080'

关于python - 错误 "pyral.context.RallyRESTAPIError: SSL certificate verification failed",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36706002/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com