A
A
alwaystried2022-04-08 09:39:37
Bots
alwaystried, 2022-04-08 09:39:37

Why does asyncio throw a timeout error?

For some unknown reason, the bot automatically turns itself off after a while. And I can't figure out why. The trace outputs the following:

ERROR:aiogram.dispatcher.dispatcher:Cause exception while getting updates.
Traceback (most recent call last):
  File "/Users/redwest/PycharmProjects/interpoject/venv/lib/python3.10/site-packages/aiogram/dispatcher/dispatcher.py", line 381, in start_polling
    updates = await self.bot.get_updates(
  File "/Users/redwest/PycharmProjects/interpoject/venv/lib/python3.10/site-packages/aiogram/bot/bot.py", line 110, in get_updates
    result = await self.request(api.Methods.GET_UPDATES, payload)
  File "/Users/redwest/PycharmProjects/interpoject/venv/lib/python3.10/site-packages/aiogram/bot/base.py", line 231, in request
    return await api.make_request(await self.get_session(), self.server, self.__token, method, data, files,
  File "/Users/redwest/PycharmProjects/interpoject/venv/lib/python3.10/site-packages/aiogram/bot/api.py", line 139, in make_request
    async with session.post(url, data=req, **kwargs) as response:
  File "/Users/redwest/PycharmProjects/interpoject/venv/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "/Users/redwest/PycharmProjects/interpoject/venv/lib/python3.10/site-packages/aiohttp/client.py", line 559, in _request
    await resp.start(conn)
  File "/Users/redwest/PycharmProjects/interpoject/venv/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 893, in start
    with self._timer:
  File "/Users/redwest/PycharmProjects/interpoject/venv/lib/python3.10/site-packages/aiohttp/helpers.py", line 721, in __exit__
    raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question