- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是 Heroku 的新手,只是尝试部署一个 python 音乐不和谐机器人(从 GitHub 分支部署)。
部署成功,机器人正在工作。
但是,当我尝试播放音乐时,它给了我一个错误:
2021-09-17T01:24:43.596654+00:00 app[worker.1]: voice_channel.play(discord.FFmpegPCMAudio(executable="FFmpeg/bin/ffmpeg.exe", source=filename))
2021-09-17T01:24:43.596654+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/discord/player.py", line 225, in __init__
2021-09-17T01:24:43.596656+00:00 app[worker.1]: super().__init__(source, executable=executable, args=args, **subprocess_kwargs)
2021-09-17T01:24:43.596666+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/discord/player.py", line 138, in __init__
2021-09-17T01:24:43.596668+00:00 app[worker.1]: self._process = self._spawn_process(args, **kwargs)
2021-09-17T01:24:43.596689+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/discord/player.py", line 144, in _spawn_process
2021-09-17T01:24:43.596689+00:00 app[worker.1]: process = subprocess.Popen(args, creationflags=CREATE_NO_WINDOW, **subprocess_kwargs)
2021-09-17T01:24:43.596699+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/subprocess.py", line 951, in __init__
2021-09-17T01:24:43.596700+00:00 app[worker.1]: self._execute_child(args, executable, preexec_fn, close_fds,
2021-09-17T01:24:43.596708+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/subprocess.py", line 1823, in _execute_child
2021-09-17T01:24:43.596709+00:00 app[worker.1]: raise child_exception_type(errno_num, err_msg, err_filename)
2021-09-17T01:24:43.596743+00:00 app[worker.1]: PermissionError: [Errno 13] Permission denied: 'FFmpeg/bin/ffmpeg.exe'
2021-09-17T01:24:43.596743+00:00 app[worker.1]:
2021-09-17T01:24:43.596744+00:00 app[worker.1]: The above exception was the direct cause of the following exception:
2021-09-17T01:24:43.596744+00:00 app[worker.1]:
2021-09-17T01:24:43.596746+00:00 app[worker.1]: Traceback (most recent call last):
2021-09-17T01:24:43.596778+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/discord/client.py", line 343, in _run_event
2021-09-17T01:24:43.596780+00:00 app[worker.1]: await coro(*args, **kwargs)
2021-09-17T01:24:43.596788+00:00 app[worker.1]: File "/app/bot.py", line 665, in on_command_error
2021-09-17T01:24:43.596789+00:00 app[worker.1]: raise error
2021-09-17T01:24:43.596798+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 939, in invoke
2021-09-17T01:24:43.596799+00:00 app[worker.1]: await ctx.command.invoke(ctx)
2021-09-17T01:24:43.596808+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/discord/ext/commands/core.py", line 863, in invoke
2021-09-17T01:24:43.596808+00:00 app[worker.1]: await injected(*ctx.args, **ctx.kwargs)
2021-09-17T01:24:43.596817+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/discord/ext/commands/core.py", line 94, in wrapped
2021-09-17T01:24:43.596817+00:00 app[worker.1]: raise CommandInvokeError(exc) from exc
2021-09-17T01:24:43.596833+00:00 app[worker.1]: discord.ext.commands.errors.CommandInvokeError: Command raised an exception: PermissionError: [Errno 13] Permission denied: 'FFmpeg/bin/ffmpeg.exe'
bot.py
中的问题:
voice_channel.play(discord.FFmpegPCMAudio(executable="FFmpeg/bin/ffmpeg.exe", source=filename))
ffmpeg.exe
的路径在 GitHub 存储库中已经正确;但它不起作用并给出此错误:
PermissionError: [Errno 13] Permission denied: 'FFmpeg/bin/ffmpeg.exe'
任何人都可以帮忙吗?
ClientException: ffmpeg.exe was not found.
最佳答案
Heroku 让您可以访问在后台使用 linux 发行版的虚拟 shell。鉴于 *.exe
文件不在 linux 中运行(至少不能直接运行),您将无法使其运行。此外,出于安全原因(以及其他原因),他们不应该让人们在某些目录上写入或执行任意二进制文件,例如您的 ffmpeg.exe
。 .
首先确保您能够连接到上述 shell 并尝试运行 ffmpeg
.如果您无法运行它,您应该在 GitHub repo 中创建一个问题它提供了您提到的构建包,解释了您遇到的问题。
关于python - Heroku 权限错误 : [Errno 13] Permission denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69216841/
我在 Ubuntu Linux Server 20.04这是我第一次向 Docker 推送东西,所以我只是在本地创建了一个虚拟容器并且它工作了。按照一些在线教程,hello-world示例也可以正常工
尝试将图像推送到 Docker Hub 上的公共(public)存储库时会发生此错误。我尝试过的其他注册表没有问题。 我查看了很多网站、博客,包括 StackOverflow,但仍然没有明确的答案。
我有个问题。我有操作系统 CentOS 5.8 。我在 httpd.conf 文件中写了这个配置: Listen 85 并在文件末尾: ServerName localhost ServerAdmi
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎与 help center 中定义的范围内的编程无关。 . 关闭 9 年前。 Improve
请帮我配置 python 服务器。当我使用 python 命令在 cmd 中执行 .pyw 文件时出现错误我收到错误: IOError: [Errno 13] Permission denied(Pe
我是第一次尝试 CGI 脚本,但没有成功。我已经阅读了很多教程并关注了不同论坛中的主题,但我无法使其正常工作。我在 Fedora 10 机器上使用 appache 网络服务器。我总是有问题 [Wed
在两个文件中使用相同的 mdb.connect 行。使用 debian 7,我的问题现在是向您提供更多详细信息,因为我在问题中使用了很多代码,但我没有什么可告诉的。文件 1 工作正常。 #!/usr/
我正在尝试将数据洞察报告连接到表格和 BigQuery 中的 View 。在 BigQuery 中,表从位于我的云端硬盘中的 GoogleSheet 接收数据, View 正在查询同一个表,但添加了一
我正在尝试为我的 docker hub 存储库创建一个 list ,以便我拥有一个多平台镜像。 我的程序如下: 我首先创建一个空的存储库并向其中推送两个图像,一个用于 amd64,另一个用于 arm6
我正在尝试在我的 arch linux lamp 服务器中使用 fuecms。但是我不能让 htaccess 工作。我的主文件夹是 ytsejam/fuel_cms/.. 这是我的 .htaccess
我有一个简单的docker-compose.yml文件以这种方式定义: version: '3' services: db: image: postgres:10.5-alpine
所以我使用了 testcafe 的默认 docker,它在 docker hub 上是 testcafe/testcafe,我必须运行一些 testcafe 脚本。 但是,我需要将错误触发的屏幕截图上
我在 ubuntu 上使用 Hyperledger Fabric 2.2。我正在尝试借助 article 使用 express.js 创建 REST API . 我的结构网络和 apiserver.j
最近将 macOS Mojave (10.14.4) 上的 Logstash(通过 Homebrew 安装)升级到版本 6.7.0,但事情没有按预期运行。当我尝试通过命令行手动运行它(出于本地开发目的
最近将 macOS Mojave (10.14.4) 上的 Logstash(通过 Homebrew 安装)升级到版本 6.7.0,但事情没有按预期运行。当我尝试通过命令行手动运行它(出于本地开发目的
我的想法是 eclipse-luna 。系统是windows 7旗舰版。我使用 spring security 将 *.jar 复制到我的项目并“添加到构建路径”。请查看有关警告的图片
我在 vmware 播放器上使用 ubuntu 16.04。共享文件夹已启用并且在/mnt/fghs 上可见。但是,所有者(root)不能被 chown 改变。如何改变它?请给我建议。 另外,有人说修
我刚开始学习 SQL 的基础知识,当我在搜索数据操作语言、数据控制语言、数据定义语言时,有些东西没有意义。 据我了解,Data Control Language 有 3 个关键词:Grant、Deny
我要迁移到新服务器,并希望在过渡期间将我的所有站点都脱机。我知道我可以将它放在我的根 .htaccess 文件中以阻止人们访问该站点: order deny,allow deny from all 但
我正在尝试使用 os.Mkdir() 创建一个目录,然后在其中创建文件,类似于这个脚本: package main import ( "log" "os" "path" ) f
我是一名优秀的程序员,十分优秀!