We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi. Here is small bot demonstrates the problem:
import asyncio from telebot.async_telebot import AsyncTeleBot TOKEN = '**********' bot = AsyncTeleBot(TOKEN) @bot.message_handler(commands=['id']) async def id_command(message): return await bot.reply_to(message, text=f'Your id: {message.chat.id}') @bot.message_handler(content_types=['photo']) async def photo_handler(message): file_id = message.photo[-1].file_id file_info = await bot.get_file(file_id) # This download method causes: # Aiohttp ClientError: ClientOSError and then # Request timeout. Request: .... and then # Infinity polling: polling exited # on the next message _file = await bot.download_file(file_info.file_path) return await bot.reply_to(message, f'Path: {file_info.file_path}; Length:{len(_file)}' ) if __name__ == '__main__': loop = asyncio.new_event_loop() # Not recovering with infinity_polling: await self._process_polling(non_stop=False.... # Version 4.6.0 recovering after Aiohttp ClientError # Version 4.6.1 and 4.7.0 not recovering loop.create_task(bot.infinity_polling()) # Recovering: # loop.create_task(bot.polling(non_stop=True)) loop.run_forever() # The scenario: # - bot is run # - send /id command and get reply # - send any image file and get the filename and file length # - send /id and get polling exited with: # (asyncio_helper.py:80 MainThread) ERROR - TeleBot: "Aiohttp ClientError: ClientOSError" # (async_telebot.py:317 MainThread) ERROR - TeleBot: "Request timeout. Request: method=get url=getUpdates params=<aiohttp.formdata.FormData object at 0x0000025A91E391E0> files=None request_timeout=None" # (async_telebot.py:276 MainThread) ERROR - TeleBot: "Infinity polling: polling exited" # (async_telebot.py:278 MainThread) ERROR - TeleBot: "Break infinity polling"
The text was updated successfully, but these errors were encountered:
Your os? You were supposed to answer to this questions. I think this might happen due to file rights
Sorry, something went wrong.
pass non_stop=True to continue the work of the polling
Btw, you should create an issue on official repo, not here
No branches or pull requests
Hi.
Here is small bot demonstrates the problem:
The text was updated successfully, but these errors were encountered: