When I try to send a Telegram message with a size > 500kb, this message is shown:
2018-05-06 17:05:56 ERROR (SyncWorker_14) [homeassistant.components.telegram_bot] Error sending file: urllib3 HTTPError ('Connection aborted.', timeout('The write operation timed out',)). Args: (-252803343, <_io.BufferedReader name='/camera/FI9816P_00626E854E78/record/MDalarm_20180430_180038.mkv'>), kwargs: {'caption': None, 'parse_mode': 'Markdown', 'disable_notification': False, 'disable_web_page_preview': None, 'reply_to_message_id': None, 'reply_markup': None, 'timeout': None}
If I change the file size to a smaller one the notifications work fine. Any idea? Is possible to increase the timeout? The most common size for my files are 1-2Mb.
This is an issue in the dependency -> https://github.com/python-telegram-bot/python-telegram-bot/issues/533
Thanks. I will research the issue in the dependency.
Sadly https://github.com/python-telegram-bot/python-telegram-bot/issues/533 has been closed because they cannot reproduce. I have exactly the same issue.
While uploading files default timeout value is 20 sec. This issue can be resolved by increasing timeout value
bot.send_audio(chat_id=self.chatid, audio=open(url, 'rb'), timeout=1000)
Hope it will help
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 馃憤
While uploading files default timeout value is 20 sec. This issue can be resolved by increasing timeout value
bot.send_audio(chat_id=self.chatid, audio=open(url, 'rb'), timeout=1000)
Hope it will help
Could you try to submit it upstream?
The issue still persists. You cannot send a video longer than 2 seconds
Most helpful comment
While uploading files default timeout value is 20 sec. This issue can be resolved by increasing timeout value
bot.send_audio(chat_id=self.chatid, audio=open(url, 'rb'), timeout=1000)
Hope it will help