3

I am developing a bot for discord and I pushed it to heroku. When it started running it showed some error like this

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

I searched it one google and all I found is saying to remove L from the hexadecimal. But it aint my code. Its from Heroku python lib. How I can I fix this

Does it has anything to do with youtube_dl

Rockzy 77
  • 53
  • 5
  • 1
    Have you checked python versions both on your system and heroku? As [this answer](https://stackoverflow.com/a/15031120/11490644) is similar to your core error, I would recommend to try lower python version suggested by youtube-dl lib – MJK618 Jul 18 '22 at 08:43
  • 1
    yes..both are same.. 3.10.5 – Rockzy 77 Jul 18 '22 at 08:46
  • @Rockzy77, did you install any crypto python package on heroku? What is your requirements.txt like? Are you using the latest version of youtube_dl? – viggnah Jul 18 '22 at 14:17
  • I am using the latest version of youtube_dl. At first I didnt put crypto in requirement then error came, then I tried upgrading crypto package from heroku console, same error. Last I put the latest version of crypto in requirement and still same error – Rockzy 77 Jul 18 '22 at 14:44

1 Answers1

0

you should update your pycryptodome package manually.

pip install -U pycryptodome

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 11 '22 at 08:56