Heroku:Python,语法错误:十六进制文字无效

8ehkhllq  于 2022-11-13  发布在  Python
关注(0)|答案(1)|浏览(330)

我正在开发一个不和谐的机器人,我把它推给了heroku。当它开始运行时,它显示了一些这样的错误

2022-07-18T04:45:52.381728+00:00 heroku[worker.1]: Process exited with status 1
2022-07-18T04:45:52.217257+00:00 app[worker.1]: Traceback (most recent call last):
2022-07-18T04:45:52.217276+00:00 app[worker.1]:   File "/app/main.py", line 9, in <module>
2022-07-18T04:45:52.217378+00:00 app[worker.1]:     import youtube_dl
2022-07-18T04:45:52.217395+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.10/site-packages/youtube_dl/__init__.py", line 15, in <module>
2022-07-18T04:45:52.217445+00:00 app[worker.1]:     from .options import (
2022-07-18T04:45:52.217452+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.10/site-packages/youtube_dl/options.py", line 8, in <module>
2022-07-18T04:45:52.217503+00:00 app[worker.1]:     from .downloader.external import list_external_downloaders
2022-07-18T04:45:52.217510+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.10/site-packages/youtube_dl/downloader/__init__.py", line 5, in <module>
2022-07-18T04:45:52.217558+00:00 app[worker.1]:     from .hls import HlsFD
2022-07-18T04:45:52.217564+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.10/site-packages/youtube_dl/downloader/hls.py", line 6, in <module>
2022-07-18T04:45:52.217613+00:00 app[worker.1]:     from Crypto.Cipher import AES
2022-07-18T04:45:52.217619+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.10/site-packages/Crypto/Cipher/__init__.py", line 82, in <module>
2022-07-18T04:45:52.217713+00:00 app[worker.1]:     from Crypto.Cipher._mode_ctr import _create_ctr_cipher
2022-07-18T04:45:52.217720+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.10/site-packages/Crypto/Cipher/_mode_ctr.py", line 35, in <module>
2022-07-18T04:45:52.217779+00:00 app[worker.1]:     from Crypto.Util.number import long_to_bytes
2022-07-18T04:45:52.217795+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.10/site-packages/Crypto/Util/number.py", line 398
2022-07-18T04:45:52.217798+00:00 app[worker.1]:     s = pack('>I', n & 0xffffffffL) + s
2022-07-18T04:45:52.217875+00:00 app[worker.1]:                                 ^
2022-07-18T04:45:52.217893+00:00 app[worker.1]: SyntaxError: invalid hexadecimal literal

我在谷歌上搜索了一下,只找到了从十六进制中删除L的提示。但这不是我的代码。它来自Heroku Python lib。我该如何修复这个问题
和youtube_dl有关系吗

iih3973s

iih3973s1#

您应该手动更新pypcryptodome软件包。
pip install -U pycryptodome

相关问题