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

SSL连接错误问题 #227

Open
Pstarchen opened this issue Jan 18, 2025 · 0 comments
Open

SSL连接错误问题 #227

Pstarchen opened this issue Jan 18, 2025 · 0 comments

Comments

@Pstarchen
Copy link

在我电脑本机上运行毫无问题,但是甩到另一个windows服务器上运行则无法正常运行,错误信息如下
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiohttp\connector.py", line 1116, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs, sock=sock)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 1050, in create_connection
transport, protocol = await self._create_connection_transport(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 1080, in _create_connection_transport
await waiter
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\sslproto.py", line 529, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\sslproto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 944, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1125)

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

Traceback (most recent call last):
File "d:/qqbot_python/Project/group_reply_text.py", line 174, in
client.run(appid=test_config["appid"], secret=test_config["secret"])
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\botpy\client.py", line 135, in run
self.loop.run_until_complete(runner())
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 616, in run_until_complete
return future.result()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\botpy\client.py", line 132, in runner
await self.start(*args, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\botpy\client.py", line 158, in start
await self._bot_login(token)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\botpy\client.py", line 164, in _bot_login
user = await self.http.login(token)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\botpy\http.py", line 201, in login
await self.check_session()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\botpy\http.py", line 145, in check_session
await self._token.check_token()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\botpy\robot.py", line 41, in check_token
await self.update_access_token()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\botpy\robot.py", line 48, in update_access_token
async with session.post(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiohttp\client.py", line 1360, in aenter
self._resp: _RetType = await self._coro
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiohttp\client.py", line 663, in _request
conn = await self._connector.connect(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiohttp\connector.py", line 538, in connect
proto = await self._create_connection(req, traces, timeout)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiohttp\connector.py", line 1050, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiohttp\connector.py", line 1384, in _create_direct_connection
raise last_exc
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiohttp\connector.py", line 1353, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\aiohttp\connector.py", line 1118, in _wrap_create_connection
raise ClientConnectorCertificateError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host bots.qq.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1125)')]

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

1 participant