小编use*_*514的帖子

SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获得本地颁发者证书 (_ssl.c:1108) Discord/python

我正在使用 Pycharm 和 python 3.8 以及最新版本的不和谐。我尝试运行此脚本但出现此错误。任何人都可以帮忙吗?

import discord

TOKEN = 'xxxxx'

client = discord.Client()

@client.event
async def on_message(message):
    # we do not want the bot to reply to itself
    if message.author == client.user:
        return

    if message.content.startswith('!hello'):
        msg = 'Hello {0.author.mention}'.format(message)
        await client.send_message(message.channel, msg)

@client.event
async def on_ready():
    print('Logged in as')
    print(client.user.name)
    print(client.user.id)
    print('------')

client.run(TOKEN)
Run Code Online (Sandbox Code Playgroud)

------ 下面的错误------

/Users/mellie/PycharmProjects/Dominations/venv/bin/python /Users/mellie/PycharmProjects/Dominations/Domi.py Traceback(最近一次调用):文件“/Users/mellie/PycharmProjects/Dominations/venv/lib/python3 .8/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa File "/Library/Frameworks/Python.framework /Versions/3.8/lib/python3.8/asyncio/base_events.py", line 1042, in create_connection …

python discord.py

3
推荐指数
2
解决办法
2万
查看次数

标签 统计

discord.py ×1

python ×1