AnsweredAssumed Answered

SSL certificate verification failed

Question asked by nagarjunadikesavan on Apr 5, 2018
Latest reply on Apr 9, 2018 by nagarjunadikesavan

Hi,

 

I am using Python script to connect Rally from my windows machine to retrieve the all defects but am getting below error. 

 

Traceback (most recent call last):
File "C:/Users/PycharmProjects/NextGen/Connecting_Rally.py", line 42, in <module>
main(sys.argv[1:])
File "C:/Users/PycharmProjects/NextGen/Connecting_Rally.py", line 23, in main
rally = Rally('rally1.rallydev.com', user='X***', password='***', workspace='XXXX', project='XXXX')
File "C:\Users\PycharmProjects\NextGen\venv\lib\site-packages\pyral\restapi.py", line 259, in __init__
self.contextHelper.check(self.server, wksp, proj, self.isolated_workspace)
File "C:\Users\PycharmProjects\NextGen\venv\lib\site-packages\pyral\context.py", line 171, in check
user_response = self._getUserInfo()
File "C:\Users\PycharmProjects\NextGen\venv\lib\site-packages\pyral\context.py", line 276, in _getUserInfo
raise RallyRESTAPIError(problem)
pyral.context.RallyRESTAPIError: SSL certificate verification failed

 

Code Used: 

#################################################################################################
#
#  showdefects -- show defects in a workspace/project conforming to some common criterion
#
#################################################################################################

import sys, os
from pyral import Rally, rallyWorkset, RallyRESTAPIError

#################################################################################################

errout = sys.stderr.write

#################################################################################################

def main(args):
    options = [opt for opt in args if opt.startswith('--')]
    args = [arg for arg in args if arg not in options]
    server, username, password, apikey, workspace, project = rallyWorkset(options)
    if apikey:
        rally = Rally('rally1.rallydev.com', apikey=apikey, workspace=workspace, project=project)
    else:
        rally = Rally('rally1.rallydev.com', user='***', password='XXXX', workspace='***', project='XXXXX')
    rally.enableLogging("rally.history.showdefects")

    fields = "FormattedID,State,Name,Severity,Priority"
    criterion = 'State != Closed'

    response = rally.get('Defect', fetch=fields, query=criterion, order="FormattedID",
                         pagesize=200, limit=400)

    for defect in response:
        print("%-8.8s  %-52.52s  %s" % (defect.FormattedID, defect.Name, defect.State))

    print("-----------------------------------------------------------------")
    print(response.resultCount, "qualifying defects")

#################################################################################################
#################################################################################################

if __name__ == '__main__':
    main(sys.argv[1:])
    sys.exit(0)

Outcomes