Does anyone know why an error in Heroku Dashboard appears when I deploy branch? The manual deploy by connecting to my Github repo branch works fine and says it deployed successfully, but when I visit the page I get the error message
Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
heroku logs –tail
enter image description here
I need help to solve this issue
Here the logs:
enter image description here
enter image description here
Ele is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2
Your issue is in the Python code, not the deployment. Although the deployment was successful, the Python code throws an error when executed.
SyntaxWarning: invalid escape sequence
To resolve this, you need to modify the file /app/bot-team.py
at line 44:
Change this:
image_path = 'C:PythonPythScriptspepedjen.jpg'
To this:
image_path = 'C:/Python/PythScripts/pepedjen.jpg'
# OR
image_path = 'C:\Python\PythScripts\pepedjen.jpg'
This warning occurs because backslashes () are used for escape sequences in Python strings. Using a forward slash (/) or double backslashes () will avoid this issue.
Make sure you do this for all path directories in your application.
ModuleNotFoundError: No module named ‘telebot’
Additionally, you have a ModuleNotFoundError for the telebot module. Ensure you have installed the module by running:
pip install pyTelegramBotAPI
Make sure to install the module in the same Python environment.
Nathan Nóbrega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2