Y
Y
yk_vova2020-09-16 17:07:41
Python
yk_vova, 2020-09-16 17:07:41

The code works fine on the local machine, but if I upload it to Heroku it doesn't work. How to fix?

I tested it on my machine, everything worked fine, but when I uploaded it to heroku, the bot stopped responding. What is the problem, and if it's not difficult, write how to solve it ...

here is a link to my code;
https://pastebin.com/PraZNair

code in Procfile:

spoiler

worker: python bot.py

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2020-09-16
@yk_vova

Potentially it could fall here:

try:
    import Image
except ImportError:
    from PIL import Image

well, because of absolute paths like
"C:\Users\vayak\PycharmProjects\pythonProject5\img.jpg"

Heroku runs on Linux. ;-)
Is there a requirements.txt file in the code? What's in it?
What's in the application logs?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question