telegramircd icon indicating copy to clipboard operation
telegramircd copied to clipboard

Not connecting to Telegram

Open EDmitry opened this issue 5 years ago • 6 comments

I am running the server like this: ~/telegramircd$ ./telegramircd.py -c config ./telegramircd.py:111: RuntimeWarning: coroutine 'TelegramBaseClient.connect' was never awaited self.proc.connect() 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() INFO: [email protected] registered

I am able to connect to it via WeeChat and join #telegram, but nothing happens past that. I don't receive the code for oper. Is there any additional logging I could collect to figure out what's wrong?

EDmitry avatar Dec 08 '19 02:12 EDmitry

I think this might be related to this issue: https://github.com/LonamiWebs/Telethon/issues/1180

I wasn't able to install telethon-sync, and instead used telethon.

EDmitry avatar Dec 08 '19 02:12 EDmitry

Downgraded telethon to 0.19.1.6 and now getting this error when retrieving the channel list:

INFO: Connecting to 149.154.175.100:443... INFO: Connection success! INFO: Initializing a new connection while invoking INFO: Starting to wait for items from the network /usr/local/lib/python3.6/dist-packages/telethon/telegram_client.py:2541: UserWarning: You have not setup any workers, so you won't receive updates. Pass update_workers=1 when creating the TelegramClient, or set client.self.updates.workers = 1 "You have not setup any workers, so you won't receive updates." Traceback (most recent call last): File "./telegramircd.py", line 295, in init web.channel_list() File "./telegramircd.py", line 265, in channel_list hash=0 TypeError: init() got an unexpected keyword argument 'hash' INFO: [email protected] registered

EDmitry avatar Dec 08 '19 02:12 EDmitry

Having the same issue when trying to create a new deployment, might need to be refactored to use the latest version of Telethon, or the old version of telegram-sync might need to be hosted somewhere else.

rodneyrod avatar Jan 08 '20 08:01 rodneyrod

Tried with the last version of Telethon that matched the version of Telethon-Sync I could find, v1.1.1, however it never loads events and the following is listed in the terminal:

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

rodneyrod avatar Jan 09 '20 00:01 rodneyrod

No luck finding an old version of telethon-sync hosted anywhere either, and I have a feeling the Telethon dev probably won't be supplying those by request as they were forcably deprecated.

rodneyrod avatar Jan 09 '20 01:01 rodneyrod

I never learned how to use Python async/await properly... It seems that migrating to Telethon requires quite amount of work and many methods may need to be turned async. Is that right?

MaskRay avatar May 22 '20 17:05 MaskRay