Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

遇到了证书问题Cannot connect to host speech.platform.bing.com #1

Closed
fengyunzaidushi opened this issue Jul 18, 2023 · 1 comment

Comments

@fengyunzaidushi
Copy link

fengyunzaidushi commented Jul 18, 2023

出现问题

aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host speech.platform.bing.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)')]

详情:

Traceback (most recent call last):
  File "/opt/miniconda3/envs/chatglm_etuning/lib/python3.10/site-packages/aiohttp/connector.py", line 1091, in _start_tls_connection
    tls_transport = await self._loop.start_tls(
  File "/opt/miniconda3/envs/chatglm_etuning/lib/python3.10/asyncio/base_events.py", line 1253, in start_tls
    await waiter
  File "/opt/miniconda3/envs/chatglm_etuning/lib/python3.10/asyncio/sslproto.py", line 534, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/opt/miniconda3/envs/chatglm_etuning/lib/python3.10/asyncio/sslproto.py", line 188, in feed_ssldata
    self._sslobj.do_handshake()
  File "/opt/miniconda3/envs/chatglm_etuning/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:1007)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/mnt/sda/github/7yue/ChatGLM2-Voice-Cloning/app_en.py", line 95, in <module>
    tts_voice_list = asyncio.get_event_loop().run_until_complete(edge_tts.list_voices(proxy=proxy))
  File "/opt/miniconda3/envs/chatglm_etuning/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/opt/miniconda3/envs/chatglm_etuning/lib/python3.10/site-packages/edge_tts/list_voices.py", line 24, in list_voices
    async with session.get(
  File "/opt/miniconda3/envs/chatglm_etuning/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
  File "/opt/miniconda3/envs/chatglm_etuning/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request
    conn = await self._connector.connect(
  File "/opt/miniconda3/envs/chatglm_etuning/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/opt/miniconda3/envs/chatglm_etuning/lib/python3.10/site-packages/aiohttp/connector.py", line 899, in _create_connection
    _, proto = await self._create_proxy_connection(req, traces, timeout)
  File "/opt/miniconda3/envs/chatglm_etuning/lib/python3.10/site-packages/aiohttp/connector.py", line 1325, in _create_proxy_connection
    return await self._start_tls_connection(
  File "/opt/miniconda3/envs/chatglm_etuning/lib/python3.10/site-packages/aiohttp/connector.py", line 1105, in _start_tls_connection
    raise ClientConnectorCertificateError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host speech.platform.bing.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)')]

通过

conda install certifi
解决了

@fengyunzaidushi fengyunzaidushi changed the title 遇到了证书问题unable to get local issuer certificate (_ssl.c:1007)')] 遇到了证书问题Cannot connect to host speech.platform.bing.com Jul 18, 2023
@qinchaofeng
Copy link

安装了这个包还是不行

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

No branches or pull requests

2 participants