gpt4 book ai didi

python-3.x - 所以我想将 ffmpeg 与 heroku 一起使用,但我不断收到我没有安装 ffmpeg 的错误

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

所以我制作了一个有趣的机器人,当我像在 repli 或我的本地电脑上运行它时它还可以,但在 heroku 上它不会工作。我确实将heroku的ffmpeg添加到buildpacks,但它仍然给我同样的错误,代码也可以在github上找到
https://github.com/amirdadfar9192/Goorbe_bot


2021-12-10T13:13:54.043169+00:00 app[worker.1]: Traceback (most recent call last):

2021-12-10T13:13:54.043248+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.10/site-packages/discord/ext/commands/core.py", line 85, in wrapped

2021-12-10T13:13:54.043249+00:00 app[worker.1]: ret = await coro(*args, **kwargs)

2021-12-10T13:13:54.043264+00:00 app[worker.1]: File "/app/bot.py", line 125, in p

2021-12-10T13:13:54.043264+00:00 app[worker.1]: song = await player.play()

2021-12-10T13:13:54.043287+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.10/site-packages/DiscordUtilsMod/Music.py", line 196, in play

2021-12-10T13:13:54.043287+00:00 app[worker.1]: source = discord.PCMVolumeTransformer(discord.FFmpegPCMAudio(self.music.queue[self.ctx.guild.id][0].source, **self.ffmpeg_opts))

2021-12-10T13:13:54.043302+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.10/site-packages/discord/player.py", line 225, in __init__

2021-12-10T13:13:54.043302+00:00 app[worker.1]: super().__init__(source, executable=executable, args=args, **subprocess_kwargs)

2021-12-10T13:13:54.043316+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.10/site-packages/discord/player.py", line 138, in __init__

2021-12-10T13:13:54.043317+00:00 app[worker.1]: self._process = self._spawn_process(args, **kwargs)

2021-12-10T13:13:54.043330+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.10/site-packages/discord/player.py", line 147, in _spawn_process

2021-12-10T13:13:54.043331+00:00 app[worker.1]: raise ClientException(executable + ' was not found.') from None

2021-12-10T13:13:54.043357+00:00 app[worker.1]: discord.errors.ClientException: ffmpeg was not found.

2021-12-10T13:13:54.043372+00:00 app[worker.1]:

2021-12-10T13:13:54.043373+00:00 app[worker.1]: The above exception was the direct cause of the following exception:

2021-12-10T13:13:54.043373+00:00 app[worker.1]:

2021-12-10T13:13:54.043388+00:00 app[worker.1]: Traceback (most recent call last):

2021-12-10T13:13:54.043416+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 939, in invoke

2021-12-10T13:13:54.043416+00:00 app[worker.1]: await ctx.command.invoke(ctx)

2021-12-10T13:13:54.043432+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.10/site-packages/discord/ext/commands/core.py", line 863, in invoke

2021-12-10T13:13:54.043432+00:00 app[worker.1]: await injected(*ctx.args, **ctx.kwargs)

2021-12-10T13:13:54.043447+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.10/site-packages/discord/ext/commands/core.py", line 94, in wrapped

2021-12-10T13:13:54.043447+00:00 app[worker.1]: raise CommandInvokeError(exc) from exc

2021-12-10T13:13:54.045338+00:00 app[worker.1]: discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: ffmpeg was not found.


最佳答案

结果我只需要为heroku更新我的github代码来创建一个新的构建并安装ffmpeg

关于python-3.x - 所以我想将 ffmpeg 与 heroku 一起使用,但我不断收到我没有安装 ffmpeg 的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70305131/

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