Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997) #11

Closed
codingwatching opened this issue Feb 10, 2023 · 7 comments

Comments

@codingwatching
Copy link

python3 -m EdgeGPT

        EdgeGPT - A demo of reverse engineering the Bing GPT chatbot
        Repo: github.com/acheong08/EdgeGPT
        By: Antonio Cheong

        !help for help

        Type !exit to exit
        Enter twice to send message
    
Initializing...

You:
Hi

Bot:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/EdgeGPT.py", line 351, in <module>
    asyncio.run(main())
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/EdgeGPT.py", line 317, in main
    (await bot.ask(prompt=prompt))["item"]["messages"][1]["adaptiveCards"][0][
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/EdgeGPT.py", line 245, in ask
    return await self.chat_hub.ask(prompt=prompt)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/EdgeGPT.py", line 171, in ask
    self.wss = await websockets.connect("wss://sydney.bing.com/sydney/ChatHub")
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/websockets/legacy/client.py", line 659, in __await_impl_timeout__
    return await asyncio.wait_for(self.__await_impl__(), self.open_timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/tasks.py", line 445, in wait_for
    return fut.result()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/websockets/legacy/client.py", line 663, in __await_impl__
    _transport, _protocol = await self._create_connection()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 1089, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 1119, in _create_connection_transport
    await waiter
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/sslproto.py", line 534, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/sslproto.py", line 188, in feed_ssldata
    self._sslobj.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 975, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)
@acheong08
Copy link
Owner

Looks like the site is blocked. Use a VPN

@codingwatching
Copy link
Author

I run ExpressVPN but still error
image

@acheong08
Copy link
Owner

Network issue out of scope. I can't really fix this since it's not a problem with my code

@codingwatching
Copy link
Author

I fix this
https://stackoverflow.com/questions/52805115/certificate-verify-failed-unable-to-get-local-issuer-certificate

For anyone who still wonders on how to fix this, i got mine by installing the "Install Certificates.command"

Thank you so much!

@acheong08
Copy link
Owner

@acheong08
Copy link
Owner

I fix this https://stackoverflow.com/questions/52805115/certificate-verify-failed-unable-to-get-local-issuer-certificate

For anyone who still wonders on how to fix this, i got mine by installing the "Install Certificates.command"

Ah nice

@HuaianWu
Copy link

HuaianWu commented Mar 4, 2023

this fix my problem.thanx

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants