fix: prevent SSLCertVerificationError when creating websocket to server
Description
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [X ] Follow the
CONTRIBUTINGGuide. - [ ] You are listed as the author in your notebook or README file.
- [ ] Your account is listed in
CODEOWNERSfor the file(s).
- [ ] Your account is listed in
- [X] Make your Pull Request title in the https://www.conventionalcommits.org/ specification.
- [ ] Ensure the tests and linter pass (Run
nox -s formatfrom the repository root to format). - [ ] Appropriate docs were updated (if necessary)
The Fix:
The following error was encountered when "Connect" was pressed:
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)
The fix is to use certifi and make sure ssl_context using certifi is passed into the websocket creation.
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!
-- conventional-commit-lint bot https://conventionalcommits.org/
Holding off on merging til more tests are done on this -- thanks!
Confirmed it was a local cert problem on my machine, user env problem, not the code.