Discord.py SSLCertVerificationError [英] Discord.py SSLCertVerificationError

查看:92
本文介绍了Discord.py SSLCertVerificationError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究机器人,昨晚它可以按需正常运行,但是今天早晨,当我在终端中打开机器人时,出现以下错误:

I have been working on a bot and last night it was working just fine operating as needed but this morning when I opened the bot in my terminal I got this following error:

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)')]

我的令牌是最新的,我拥有Discord.py和python的最新版本

My token is up to date, I have the latest versions of both Discord.py and python

非常感谢您的帮助

推荐答案

由于您使用的是Windows,

Since you are using Windows,

  1. 最好以管理员身份打开Internet Explorer

  1. Open Internet Explorer preferably as Administrator

打开discord.com

Open discord.com

在地址栏上,单击锁定图标

On address bar, click on the lock icon

单击安装证书"并安装证书

Click on Install Certificates and install the certificate

您可能正面临问题,因为他们使用的Sectigo证书已于2020年5月30日过期.

Probably you are facing the problem because they were using Sectigo Certificate which expired on 30th May 2020.

这篇关于Discord.py SSLCertVerificationError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆