Rally Python API

4.3k views Asked by At

I am trying to get to my company's Rally subscription using the Python toolkit following the instructions at http://developer.rallydev.com/help/python-toolkit-rally-rest-api

However, I am running into the following error.

Traceback (most recent call last): File "test_prog.py", line 12, in rally = Rally(server, user, password, workspace=workspace, project=project) File "C:\Python27\lib\site-packages\pyral\restapi.py", line 184, in init self.contextHelper.check(self.server) File "C:\Python27\lib\site-packages\pyral\context.py", line 153, in check raise RallyRESTAPIError(problem) pyral.context.RallyRESTAPIError: hostname: 'https://rally1.rallydev.com/slm/login.op ' non-existent or unreachable

Does anyone know if there are any subscription settings that would control/restrict access to it using the pyral Rally REST API?

I am using pyral 0.9.1 with requests 0.9.3 and certifi 0.0.8 using Python 2.7 on a Windows 7 platform.

Any help/insight is highly appreciated. Thanks,

3

There are 3 answers

0
AudioBubble On BEST ANSWER

Do you access the internet through a proxy server? You may wish to check with your IT department about this.

Unfortunately, there are some limitations in the requests and urllib packages (upon which pyral relies) handle HTTP over HTTPS.

The requests package machinery does not correctly support HTTPS over HTTP which is exactly what a proxy must do to connect to Rally since all URLs are HTTPS based. The maintainers of the the requests package are aware of this situation and there are code fixes for the underlying dependency (urllib3) that are currently being evaluated for inclusion.

When the requests package incorporates the code to support proxy correctly, Rally's developers plan to incorporate that code and will provide the configuration step (setting an environment variable) for pyral to work in a proxied environment.

0
Piotus On

pyral use ping to check if the server is available so it won;t work over proxy till you update context.py in the pyral source code (comment out lines 146-150)

###reachable, problem = Pinger.ping(target_host)
###if not reachable:
###if not problem:
###problem = "host: '%s' non-existent or unreachable"  %    target_host
###raise RallyRESTAPIError(problem)
0
Akhil Kumar On

When you try to integrate CA Agile Central with your python API, if this error occurs.

Target Rally host: 'https://rally1.rallydev.com' non-existent or unreachable

try using 'rally1.rallydev.com' not 'https://rally1.rallydev.com'

rally = Rally(server="rally1.rallydev.com", user,
                      password,
                      workspace,
                      project)

Using pyral version: 1.4.0