TG-FileStreamBot icon indicating copy to clipboard operation
TG-FileStreamBot copied to clipboard

Bot Not Responding for Any Messages in python3.10

Open DeekshithSH opened this issue 3 years ago • 1 comments

I tried to run the bot in python3.10 and Sent message to the bot but The bot not responding,

It's a Problem if Deploying on Heroku because Heroku use python 3.10 as Default Python version,

Also when i stop the bot i get the following

RuntimeError: Task <Task pending name='Task-155' coro=<cleanup() running at /home/user/project/git/TelegramBot/TG-FileStreamBot/WebStreamer/__main__.py:70> cb=[_run_until_complete_cb() at /usr/lib/python3.10/asyncio/base_events.py:184]> got Future <Task pending name='Task-25' coro=<Dispatcher.handler_worker() running at /home/user/.local/lib/python3.10/site-packages/pyrogram/dispatcher.py:184>> attached to a different loop
Full Error
[12/04/2022 18:35:11][INFO] => Stop signal received (SIGINT). Exiting...
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/user/project/git/TelegramBot/TG-FileStreamBot/WebStreamer/__main__.py", line 80, in <module>
    loop.run_until_complete(cleanup())
  File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/home/user/project/git/TelegramBot/TG-FileStreamBot/WebStreamer/__main__.py", line 70, in cleanup
    await StreamBot.stop()
  File "/home/user/.local/lib/python3.10/site-packages/pyrogram/methods/utilities/stop.py", line 58, in stop
    await do_it()
  File "/home/user/.local/lib/python3.10/site-packages/pyrogram/methods/utilities/stop.py", line 54, in do_it
    await self.terminate()
  File "/home/user/.local/lib/python3.10/site-packages/pyrogram/methods/auth/terminate.py", line 46, in terminate
    await self.dispatcher.stop()
  File "/home/user/.local/lib/python3.10/site-packages/pyrogram/dispatcher.py", line 144, in stop
    await i
RuntimeError: Task <Task pending name='Task-155' coro=<cleanup() running at /home/user/project/git/TelegramBot/TG-FileStreamBot/WebStreamer/__main__.py:70> cb=[_run_until_complete_cb() at /usr/lib/python3.10/asyncio/base_events.py:184]> got Future <Task pending name='Task-25' coro=<Dispatcher.handler_worker() running at /home/user/.local/lib/python3.10/site-packages/pyrogram/dispatcher.py:184>> attached to a different loop

DeekshithSH avatar Apr 12 '22 13:04 DeekshithSH

This Thread may be helpful : https://stackoverflow.com/questions/56689198/runtimeerror-task-got-future-future-pending-attached-to-a-different-loop

wiz64 avatar Aug 01 '22 07:08 wiz64

Fixed with new version

eyMarv avatar Jan 31 '23 10:01 eyMarv