telegramircd icon indicating copy to clipboard operation
telegramircd copied to clipboard

Application.make_handler(...) is deprecated, use AppRunner API instead

Open christianhorton opened this issue 5 years ago • 5 comments

I am trying to run using python3.8 but I keep running into this

telegramircd.py:135: DeprecationWarning: Application.make_handler(...) is deprecated, use AppRunner API instead self.handler = self.app.make_handler() telegramircd.py:111: RuntimeWarning: coroutine 'TelegramBaseClient.connect' was never awaited self.proc.connect() RuntimeWarning: Enable tracemalloc to get the object allocation traceback Traceback (most recent call last): File "telegramircd.py", line 294, in init web.get_self() File "telegramircd.py", line 290, in get_self server.user_id = data.id AttributeError: 'coroutine' object has no attribute 'id' telegramircd.py:298: RuntimeWarning: coroutine 'UserMethods.get_me' was never awaited traceback.print_exc() RuntimeWarning: Enable tracemalloc to get the object allocation traceback

I've tried older versions of aiohttp but have no luck. Any ideas?

christianhorton avatar Jan 19 '20 20:01 christianhorton

Having the same issue, I think it has to do with telethon-sync being dropped upstream and there don't appear to be any mirrors.

I'm also not sure how to compile telethon into a compatible library either.

rodneyrod avatar Mar 08 '20 11:03 rodneyrod

temporary solution

diff --git a/requirements.txt b/requirements.txt
index f2fe048..472c3fa 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,6 @@
-aiohttp
+aiohttp==3.1.0
 python-magic
 ipdb
 ipython
 configargparse
-telethon-sync
+https://github.com/LonamiWebs/Telethon/archive/sync-stale.zip

stefansaraev avatar Mar 27 '20 17:03 stefansaraev

Thanks confirmed this works

rodneyrod avatar Apr 22 '20 22:04 rodneyrod

I have applied

-telethon-sync
+https://github.com/LonamiWebs/Telethon/archive/sync-stale.zip

for now. For https://github.com/aio-libs/aiohttp/pull/3157 , how to properly fix it?

MaskRay avatar May 22 '20 17:05 MaskRay

I have applied

-telethon-sync
+https://github.com/LonamiWebs/Telethon/archive/sync-stale.zip

for now. For aio-libs/aiohttp#3157 , how to properly fix it?

tbh, I tried, and failed (and well I am noob), so decided to go for an older version of aiohttp

stefansaraev avatar May 22 '20 18:05 stefansaraev