#Openai x Telegrambot errors

3 messages · Page 1 of 1 (latest)

willow quiver
#

Hello there. I coded a Telegrambot via Python and API, where you can ask openAI questions or generate pictures in private chat and in groups by /ask Text and /aski Dog for pictures.

I run it on a vps and after a lot of people tried the bot, of course I got request errors and the bot shuts down and I need to restart manually. So I found a fix, that the bot polling is infinite, if there is an error, it shows me the error, but still continues. Same as in pictures, Openai censores Politicans or FSK18 pics so the picture variable was empty and it couldn't print, so if there is an error, it takes an "Error" picture from google 😄

My newest Error is:
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=25)

And I don't know how to fix that one, because this time the Python program stops running after this error.

So here is the full console quote forthe error is in the text folder.
Does anyone else has this problem?

tame nova
#

but I see that it’s a read timed out error, which means that you might have a firewall or something blocking the connection to their API, or your internet connection may have been unreliable at the time of the request