EverythingSuckz / TG-FileStreamBot

A telegram bot that will give instant stream links for telegram files without the need of waiting till the download completes.
GNU Affero General Public License v3.0
1.32k stars 1.29k forks source link

Bot Not Responding for Any Messages in python3.10 #52

Closed DeekshithSH closed 1 year ago

DeekshithSH commented 2 years ago

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 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 cb=[_run_until_complete_cb() at /usr/lib/python3.10/asyncio/base_events.py:184]> got Future > attached to a different loop ```
wiz64 commented 2 years ago

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

eyMarv commented 1 year ago

Fixed with new version