Answer the question
In order to leave comments, you need to log in
How to run a Telegram bot on a VPS server?
When starting the Telegram bot, it gives an error:
Since I'm working with Linux for the first time, I followed the instructions of the person from habr https://habr.com/en/post/347106/
Even when systemctl writes that the bot is active in the telegram, nothing works, and after repeated entering the systemctl status bot command gives the same error.
Answer the question
In order to leave comments, you need to log in
Thank you all for your help! The problem is solved, I installed Ubuntu 18.04, and also updated python to version 3.6.9.
journalctl -u bot
will show what the bot said before dying. systemctl says that the bot is active, because, apparently, it does not die immediately, but restarts after the fall (auto-restart)
since there is no knowledge to embed a logger, run the bot not through a unit, but directly.
an error will be displayed in the console with which the bot falls.
then either google or paste the error here.
check your python version to see if you have features that are not yet supported by your version.
as f'string' example since 3.6
/usr/bin/python3 /usr/local/bin/bot/bot.py
python3 -V
The console says it's a syntax error. White on black. Go and check what's wrong there, and without a configuration, you can only poke your fingers into this problem and send it back to figure it out
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question