Skip to content
New issue

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

RuntimeError: Task got Future attached to a different loop #6

Open
Eikosa opened this issue Jun 11, 2022 · 1 comment
Open

RuntimeError: Task got Future attached to a different loop #6

Eikosa opened this issue Jun 11, 2022 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@Eikosa
Copy link
Contributor

Eikosa commented Jun 11, 2022

Task <Task pending name='Task-30' coro=<Dispatcher.handler_worker() running at /usr/local/lib/python3.8/dist-packages/pyrogram/dispatcher.py:240>> got Future <Future pending cb=[Client.clear_listener(5177820294)()]> attached to a different loop
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker
    await handler.callback(self.client, *args)
  File "/usr/local/lib/python3.8/dist-packages/pyromod/listen/listen.py", line 93, in resolve_listener
    await self.user_callback(client, message, *args)
  File "main.py", line 404, in me
    answer = await client.ask(5177820294, '/rehber')
  File "/usr/local/lib/python3.8/dist-packages/pyromod/listen/listen.py", line 60, in ask
    response = await self.listen(chat_id, filters, timeout)
  File "/usr/local/lib/python3.8/dist-packages/pyromod/listen/listen.py", line 55, in listen
    return await asyncio.wait_for(future, timeout)
  File "/usr/lib/python3.8/asyncio/tasks.py", line 455, in wait_for
    return await fut
RuntimeError: Task <Task pending name='Task-30' coro=<Dispatcher.handler_worker() running at /usr/local/lib/python3.8/dist-packages/pyrogram/dispatcher.py:240>> got Future <Future pending cb=[Client.clear_listener(5177820294)()]> attached to a different loop
@imDivu
Copy link

imDivu commented Mar 11, 2023

Task <Task pending name='Task-30' coro=<Dispatcher.handler_worker() running at /usr/local/lib/python3.8/dist-packages/pyrogram/dispatcher.py:240>> got Future <Future pending cb=[Client.clear_listener(5177820294)()]> attached to a different loop
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker
    await handler.callback(self.client, *args)
  File "/usr/local/lib/python3.8/dist-packages/pyromod/listen/listen.py", line 93, in resolve_listener
    await self.user_callback(client, message, *args)
  File "main.py", line 404, in me
    answer = await client.ask(5177820294, '/rehber')
  File "/usr/local/lib/python3.8/dist-packages/pyromod/listen/listen.py", line 60, in ask
    response = await self.listen(chat_id, filters, timeout)
  File "/usr/local/lib/python3.8/dist-packages/pyromod/listen/listen.py", line 55, in listen
    return await asyncio.wait_for(future, timeout)
  File "/usr/lib/python3.8/asyncio/tasks.py", line 455, in wait_for
    return await fut
RuntimeError: Task <Task pending name='Task-30' coro=<Dispatcher.handler_worker() running at /usr/local/lib/python3.8/dist-packages/pyrogram/dispatcher.py:240>> got Future <Future pending cb=[Client.clear_listener(5177820294)()]> attached to a different loop

I also got same error

Any solution??

imDivu added a commit to imDivu/pyromod that referenced this issue Mar 11, 2023
imDivu added a commit to imDivu/pyromod that referenced this issue Mar 11, 2023
imDivu added a commit to imDivu/pyromod that referenced this issue Mar 11, 2023
@usernein usernein changed the title ask is not working RuntimeError: Task got Future attached to a different loop Oct 30, 2023
@usernein usernein added the help wanted Extra attention is needed label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants