Thanks giles! I think I will stick to telepot for now since it fulfils most of the features I need and is simple to use.
I keep hitting error when I run my code on pythonanywhere when my local development environment had no issue.
- My bot will react to a command e.g. /command
- Based on the command, it will check an API to pull an URL.
- The bot will save to a local static path.
- Return the static URL with a random token to ensure telegram pulls the right version of the file.
I tried troubleshooting by changing it to a static URL without any token behind (e.g. xxxxx.jpg) but it still does not work. Not sure if I am missing anything.
The errors returned by Telegram:
telepot.exception.TelegramError: ('Bad Request: failed to get HTTP URL content', 400, {'ok': False, 'error_code': 400, 'description': 'Bad Request: failed to get HTTP URL content'})
telepot.exception.TelegramError: ('Bad Request: wrong file identifier/HTTP URL specified', 400, {'ok': False, 'error_code': 400, 'description': 'Bad Request: wrong file identifier/HTTP URL specified'})
Server.log
SIGPIPE: writing to a closed pipe/socket/fd (probably the client disconnected) on request /[path reddacted]/[imagefilename].jpg?a=[token] (ip [redacted]) !!!
uwsgi_response_write_headers_do(): Broken pipe [core/writer.c line 248] during GET /[path reddacted]/[imagefilename].jpg?a=[token] (10.0.0.20)