gpt4 book ai didi

python - Discord.py SSLCertVerificationError

转载 作者:行者123 更新时间:2023-12-04 02:35:37 25 4
gpt4 key购买 nike

我一直在开发一个机器人,昨晚它根据需要运行得很好,但是今天早上当我在终端中打开机器人时,出现以下错误:

Traceback (most recent call last):
File "d:/Documents/Bots/DS BOT/bot.py", line 58, in <module>
bot.run(token, bot=False)
File "C:\Python38\lib\site-packages\discord\client.py", line 640, in run
return future.result()
File "C:\Python38\lib\site-packages\discord\client.py", line 621, in runner
await self.start(*args, **kwargs)
File "C:\Python38\lib\site-packages\discord\client.py", line 584, in start
await self.login(*args, bot=bot)
File "C:\Python38\lib\site-packages\discord\client.py", line 442, in login
await self.http.static_login(token.strip(), bot=bot)
File "C:\Python38\lib\site-packages\discord\http.py", line 261, in static_login
data = await self.request(Route('GET', '/users/@me'))
File "C:\Python38\lib\site-packages\discord\http.py", line 165, in request
async with self.__session.request(method, url, **kwargs) as r:
File "C:\Python38\lib\site-packages\aiohttp\client.py", line 1012, in __aenter__
self._resp = await self._coro
File "C:\Python38\lib\site-packages\aiohttp\client.py", line 480, in _request
conn = await self._connector.connect(
File "C:\Python38\lib\site-packages\aiohttp\connector.py", line 523, in connect
proto = await self._create_connection(req, traces, timeout)
File "C:\Python38\lib\site-packages\aiohttp\connector.py", line 858, in _create_connection
_, proto = await self._create_direct_connection(
File "C:\Python38\lib\site-packages\aiohttp\connector.py", line 1004, in _create_direct_connection
raise last_exc
File "C:\Python38\lib\site-packages\aiohttp\connector.py", line 980, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "C:\Python38\lib\site-packages\aiohttp\connector.py", line 938, in _wrap_create_connection
raise ClientConnectorCertificateError(
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host discordapp.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1108)')]

我的 token 是最新的,我有 Discord.py 和 python 的最新版本

任何帮助是极大的赞赏

最佳答案

由于您使用的是 Windows,

  • 最好以管理员身份打开 Internet Explorer
  • 打开 discord.com
  • 在地址栏上,单击锁定图标
  • 单击安装证书并安装证书

  • 您可能面临这个问题,因为他们使用的是 2020 年 5 月 30 日到期的 Sectigo 证书。

    关于python - Discord.py SSLCertVerificationError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62107572/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com