Rally Software

  • 1.  SSL certificate verification failed

    Posted Apr 05, 2018 11:14 AM

    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)


  • 2.  Re: SSL certificate verification failed
    Best Answer

    Posted Apr 06, 2018 06:42 AM

    nagarjunadikesavan,

     

    What version of Pyral and Python are you using?

     

    Could it be a Proxy issue like this question on Stackoverflow:

     

    python - pyral Error "pyral.context.RallyRESTAPIError: SSL certificate verification failed" - Stack Overflow 

     

    Michael



  • 3.  Re: SSL certificate verification failed

    Posted Apr 06, 2018 10:24 AM

    Thanks Michael. 

     

    Please find the below details :

    Python - 2.7.14

    Pyral - (1, 4, 1)

    am still getting the same error after substituting the command : 

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

    Error : pyral.context.RallyRESTAPIError: SSL certificate verification failed



  • 4.  Re: SSL certificate verification failed

    Posted Apr 09, 2018 08:42 AM

    Thanks its worked.