【问题标题】:Problem with discord bot on python SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC]python SSLError上的discord bot问题:[SSL:DECRYPTION_FAILED_OR_BAD_RECORD_MAC]
【发布时间】:2021-05-06 23:36:09
【问题描述】:

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

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

Traceback (most recent call last):
  File "C:\Python39\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Python39\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Python39\lib\site-packages\discord\ext\commands\core.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()

【问题讨论】:

    标签: python ssl openssl discord.py pytube


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-12
      • 2020-01-22
      • 2019-02-22
      • 2021-08-23
      • 1970-01-01
      • 1970-01-01
      • 2018-03-11
      • 2018-09-13
      相关资源
      最近更新 更多