0

I Tried to deploy my python telegram bot on Heroku but when the Deploy end I Click to View it gives me Application Error. My Code is Running locally on PyCharm very well, I Prepare all the Requirements files to Deploy on Heroku(Requirement.txt & Procfile) and Uploaded them to GitHub.

This is my Code in GitHub: https://github.com/mohammad122333/python-telegram-bot

Another Question Can I Deploy my Code Without GitHub To keep my code Secure?

I'm new in stack overflow , Programming python and speaking English so Forgive me if there is a mistake..

1 Answer 1

1

You don't have a Procfile, see https://devcenter.heroku.com/articles/procfile

It tells Heroku how your project is executed.

Don't commit sensitive information such as tokens to git. Instead define them as environment variables. On the Heroku Dashboard you can use the environment variabl, see https://devcenter.heroku.com/articles/config-vars

In Python you would retrieve the value of an environment variable via:

import os
TOKEN = os.environ["TOKEN"]

You should always supply the entire log. It tells so much more information than just saying it does not work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.