Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    SSLError : certificate verify failed: unable to get local issuer certificate (

    Python SDK
    4
    4
    110
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      Dasamiya299 last edited by

      for command -

      obj=SmartConnect(api_key=api_key)
      
      

      Im getting belo error -

      Traceback (most recent call last):
        File "d:/gitlab/one_algo/stock_market/statergy_trend/NSE/selection/scripts/broker_specific_tickers.py", line 175, in <module>
          total_amount = angel_broking.get_total_balance(broker_owner, logger)
        File "D:\gitlab\one_algo\support_functions\angel_broking.py", line 89, in get_total_balance
          data = obj.generateSession(user_id,password)
        File "C:\Users\keerthan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\smartapi\smartConnect.py", line 244, in generateSession     
          loginResultObject=self._postRequest("api.login",params)
        File "C:\Users\keerthan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\smartapi\smartConnect.py", line 236, in _postRequest        
          return self._request(route, "POST", params)
        File "C:\Users\keerthan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\smartapi\smartConnect.py", line 196, in _request
          raise e
        File "C:\Users\keerthan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\smartapi\smartConnect.py", line 185, in _request
          r = requests.request(method,
        File "C:\Users\keerthan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\api.py", line 61, in request
          return session.request(method=method, url=url, **kwargs)
        File "C:\Users\keerthan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\sessions.py", line 530, in request
          resp = self.send(prep, **send_kwargs)
        File "C:\Users\keerthan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\sessions.py", line 643, in send
          r = adapter.send(request, **kwargs)
        File "C:\Users\keerthan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\adapters.py", line 514, in send
          raise SSLError(e, request=request)
      requests.exceptions.SSLError: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/auth/angelbroking/user/v1/loginByPassword (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable 
      to get local issuer certificate (_ssl.c:1123)')))
      PS D:\gitlab\one_algo>
      
      D 1 Reply Last reply Reply Quote 0
      • D
        daytrader @Dasamiya299 last edited by

        @keer2405 @admin I was also getting same errors.
        I guess the certificates are not updated.

        So as a bypass - I have updated my local cache of certificates in the python installation.

        I had posted this issue in the morning when it suddenly started to happen

        https://smartapi.angelbroking.com/topic/177/not-able-to-login

        F 1 Reply Last reply Reply Quote 0
        • F
          ForumUser_1 @daytrader last edited by

          @daytrader - how to update the cache of certificates locally?
          @admin - can you resolve this issue today itself? I am sure lot of users will be unhappy if they face it on Monday.

          A 1 Reply Last reply Reply Quote 0
          • A
            admin @ForumUser_1 last edited by

            HI @prateekjjw001 @daytrader @keer2405 Thank you for brining this to our notice. We were in the process of updating the certificate and rolled it back due to this error yesterday.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post