0

I am using the slackClient library to create a slack bot but I get ssl verification failed error when I use api.call() method of slack client. I was facing the same issue while using pip install but that got resolved by using --trusted-host. Is there some configuration in python required to access machine certs?

I have already imported the root cert into windows certificate manager and I am able to open the URL in browser securely without encountering message like "There is a problem with this website’s security certificate". I do not want to disable the SSL verification

I referred to the answers given at SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed

but slack client library calls urllib3 internally and I am not able to specify ca-file for it.

Is there a way to resolve this issue and configure python to use machine certs directly?

4
  • Does it happen even after setting the REQUESTS_CA_BUNDLE env variable?
    – Adelin
    Commented Feb 14, 2018 at 8:52
  • hi, I cannot see the requests_ca_bundle env variable could you plz describe how to set it in windows 10. I can access the certificates on my machine using certmgr.msc at run only so I don't know the location of my certificates to set the path. the certificates are installed in internal database so plz guide me as to how to set this variable.
    – Neha Yadav
    Commented Feb 14, 2018 at 9:09
  • If I'm not mistaken, you can export it (certmgr.msc gives you a Copy to file option for each certificate, in the details tab), and then you can set REQUESTS_CA_BUNDLE to point to the location of the saved certificate. And here's how to set environment variables in windows 10
    – Adelin
    Commented Feb 14, 2018 at 9:13
  • I have set the path but its still not working gives the same error again
    – Neha Yadav
    Commented Feb 14, 2018 at 9:36

1 Answer 1

0

The answer seems to be to downgrade websocket-client.

Try the following: pip3 install websocket-client==0.47.0

Source: this comment on issue

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.