【发布时间】:2020-08-09 19:04:37
【问题描述】:
我正在尝试在 heroku 中托管一个不和谐的音乐机器人,但即使它在我的本地机器上运行良好,它似乎也无法找到部署的 libopus 库。
这是我的 requirements.txt 文件:
aiohttp==1.0.5
async-timeout==2.0.1
beautifulsoup4==4.6.0
certifi==2018.1.18
cffi==1.11.5
chardet==3.0.4
cycler==0.10.0
discord.py[voice]==0.16.12
matplotlib==2.1.0
multidict==4.1.0
numpy==1.13.3
opuslib==3.0.1
pycparser==2.18
PyNaCl==1.0.1
pyparsing==2.2.0
python-dateutil==2.6.1
pytz==2017.3
scikit-learn==0.19.1
scipy==0.19.1
six==1.11.0
sklearn==0.0
websockets==3.4
youtube-dl==2018.4.9
我的文件
libopus0
git
libopus-dev -y
libssl-dev
libffi-dev -y
libsodium-dev -y
:repo:ppa:mc3man/xerus-media -y
build-essential -y
unzip -y
software-properties-common -y
我的构建包
1. https://github.com/heroku/heroku-buildpack-apt.git
2. https://github.com/heroku/heroku-buildpack-apt
3. heroku/python
4. https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git
5. https://github.com/Crazycatz00/heroku-buildpack-libopus.git
还有错误日志
2018-04-12T21:48:26.872284+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/discord/client.py", line 307, in _run_event
2018-04-12T21:48:26.872287+00:00 app[worker.1]: yield from getattr(self, event)(*args, **kwargs)
2018-04-12T21:48:26.872311+00:00 app[worker.1]: File "main.py", line 113, in on_message
2018-04-12T21:48:26.872313+00:00 app[worker.1]: music_service.voice_client = await client.join_voice_channel(voice_channel)
2018-04-12T21:48:26.872340+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/discord/client.py", line 3209, in join_voice_channel
2018-04-12T21:48:26.872343+00:00 app[worker.1]: voice = VoiceClient(**kwargs)
2018-04-12T21:48:26.872369+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/discord/voice_client.py", line 230, in __init__
2018-04-12T21:48:26.872371+00:00 app[worker.1]: self.encoder = opus.Encoder(48000, 2)
2018-04-12T21:48:26.872397+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/discord/opus.py", line 197, in __init__
2018-04-12T21:48:26.872400+00:00 app[worker.1]: raise OpusNotLoaded()
2018-04-12T21:48:26.872450+00:00 app[worker.1]: discord.opus.OpusNotLoaded
我已经在很多地方搜索并添加了他们推荐的每个包,但似乎仍然不够。希望有人能帮忙。
【问题讨论】:
标签: python-3.x heroku discord