Solving Ssl: certificate_verify_failed on APIs

Windows update downloaded the file, but while adding it to the root, it failed due to a lack of administrator privilege, and it shows an error.

Press Windows + X and click on Terminal (Admin) or Windows PowerShell (Admin) and retype all commands.

1 Like

Its working now @ABCDIt
Thanks for all the support…
The thread can be closed now…

hi ABCDlt and Hardik…with above command i am able to run Dhan script …but it is disconnecting again and again …although no previous errors of SSL certifciate…
Thanks ABCDIt

Hello @nawal555

Can you tell me the error you are getting with disconnection?

hi HArdik …its as per below …I posted on other thread as well…
“no close frame received or sent”

Hello @nawal555

This is a separate error message, will resolve it on separate thread.

ERROR:root:Exception in dhanhq>>get_fund_limits: HTTPSConnectionPool(host=‘api.dhan.co’, port=443): Max retries exceeded with url: /fundlimit (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)’)))
@Hardik Pls help me with this error in windows. Client id 1104335000

Hello @V_Swapna

Welcome to MadeForTrade community!

You can refer to this set of instructions for installing the same.

Hi Hardik. Thank you for the response. I have follow the process and installed certifi manually using the file path but still error persists. Any work around.

Hello @V_Swapna

You can check the thread and post over there. There are other work around posted there.

Hello Sir,

First of all thanks a lot for providing such valuable education to traders community.

I have followed existing steps but still getting the below error -
Disconnected from WebSocket feed.
WebSocket connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)
Reconnecting Again…

Can you help please? I am stuck now in the strike selection because of this error.
Many thanks for your help.

Rishabh_Dasgupta

thanks @Subhajitpanja
tried this still same issue. i am working from a vps. not sure if that may cause the issue?

Hi @Rishabh_Dasgupta
Try,

  1. Check point no 4
    Learn Algo Trading with Python | Codes | Youtube Series - #177 by Tradehull_Imran

  2. Disable SSL checking

    import ssl

    warnings.filterwarnings("ignore")

    # Disable SSL verification globally
    ssl._create_default_https_context = ssl._create_unverified_context
1 Like

same problem sir, please any one solve this problem

Hi @mintu_mondal

apply point no 3 from below link