I am trying to call rally server simply using below:
rally = Rally(server, user, password, workspace=workspace, project=project)
But it is giving below error:
Traceback (most recent call last):
File "testprint.py", line 20, in <module>
rally = Rally(server, user=user, password=password, workspace=workspace, project=project)
File "C:\RallyRestToolkitForPython-master\pyral\restapi.py", line 259, in __init__
self.contextHelper.check(self.server, wksp, proj, self.isolated_workspace)
File "C:\RallyRestToolkitForPython-master\pyral\context.py", line 171, in check
user_response = self._getUserInfo()
File "C:\RallyRestToolkitForPython-master\pyral\context.py", line 276, in _getUserInfo
raise RallyRESTAPIError(problem)
pyral.context.RallyRESTAPIError: Target Rally host: 'rally1.rallydev.com ' non-existent or unreachable
Since i am behind proxies, i put HTTP and HTTPS proxies in python code:
os.environ['HTTPS_PROXY'] = "PROXY:PORT"
os.environ['https_proxy'] = "PROXY:PORT"
os.environ['HTTP_PROXY'] = "PROXY:PORT"
It is now failing with below error:
Traceback (most recent call last):
File "testprint.py", line 20, in <module>
rally = Rally(server, user=user, password=password, workspace=workspace, project=project)
File "C:\RallyRestToolkitForPython-master\pyral\restapi.py", line 259, in __init__
self.contextHelper.check(self.server, wksp, proj, self.isolated_workspace)
File "C:\RallyRestToolkitForPython-master\pyral\context.py", line 171, in check
user_response = self._getUserInfo()
File "C:\RallyRestToolkitForPython-master\pyral\context.py", line 276, in _getUserInfo
raise RallyRESTAPIError(problem)
pyral.context.RallyRESTAPIError: 'Cannot connect to proxy.', error('Tunnel connection failed: 504 Unknown Host
My proxies are working, as i have run other code to verify.
I just had to work through this issue and it was caused by my Python installation not using TLS 1.2. You will need to ensure the version of OpenSSL that is being used by your Python support TLS 1.2.
To see the TLS version in use you can do this check:
To see which OpenSSL is in use:
I don't have the resolution to get OpenSSL updated to the right version. I am sure you will be able to find something for your own environment.