Closed madein713 closed 3 years ago
while(True):
try:
bot.infinity_polling()
except:
pass
for vps u can use systemd to check if bot fails but it can also be: telegram issues wifi network issues
Same to me, the polling seems like to be limited in the telegrams side so I made a systemd with restart on fail, but some say that webhook solves this issue with the connectivity...
The exception is from requests package. Perhaps need to replace requests package. There is a network problem between your server and telegram's api.
and: Can you try adding this line before polling()?
apihelper.RETRY_ON_ERROR = True bot.polling()
if u r on ubuntu vps, use service files
I started to use a service file to start the bot on fail but, if it crashes on bot command running, it misses the command and the message if it fails on it.
I have same issues did you find how to fix that?
Please answer these questions before submitting your issue. Thanks!
What version of pyTelegramBotAPI are you using? pyTelegramBotAPI==3.7.3
What OS are you using? Ubuntu 20.04 LTS
What version of python are you using? Python 3.8.5
Good day! I've been writing this bot for 6 months and now I get this error, what's the problem? i used an 'while true' loop to run, but i only get this error.