python上的discord bot出现问题SSLError:[SSL:DECRYPTION_FAILED_OR_BA



我一直在python上编写一个音乐机器人,它用pytube下载歌曲,然后在语音频道上播放。问题是下载视频超过1小时,与视频几分钟没有问题。当我这样做时,这个错误显示在控制台上:

The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:Python39libsite-packagesdiscordextcommandsbot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:Python39libsite-packagesdiscordextcommandscore.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:Python39libsite-packagesdiscordextcommandscore.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2633)

我认为重要的是在最后一行。我想这是我的连接或我的电脑的问题,我不知道这是否与此有关,但当我下载游戏《Genshin Impact》时,下载不断停止,因为我同时使用互联网时,连接出现了错误。除此之外,我从来没有遇到过人际关系方面的问题。代码很简单:

@bot.command()
async def dwld (ctx):
url = ctx.message.content.split("$dwld ",1)[1]
YouTube(url).streams.get_highest_resolution().download()

如果有人有这个问题,我已经通过格式化我的电脑并重新安装所有东西来解决它。

最新更新