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

Upgrade to working telethon version #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Mic92
Copy link

@Mic92 Mic92 commented Jun 9, 2022

The current version is no longer functional. The port might still have some bugs but at least I can read/write messages, download images and see the contact list.

@MaskRay
Copy link
Owner

MaskRay commented Jun 9, 2022

(Thank you so much for porting. Will read..)

@Mic92
Copy link
Author

Mic92 commented Jun 9, 2022

Sorry. It's a bit of a nightmare to review due to size. But I couldn't think of a better way to port it.

options = None
server = None
options: Optional[Namespace] = None
server: Optional["Server"] = None
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use single quotes

@MaskRay
Copy link
Owner

MaskRay commented Jun 11, 2022

Some errors:

Traceback (most recent call last):
  File "/home/maskray/projects/telegramircd/./telegramircd.py", line 299, in init
    await web.channel_list()
  File "/home/maskray/projects/telegramircd/./telegramircd.py", line 277, in channel_list
    date = min(msg.date for msg in r.messages)
TypeError: '<' not supported between instances of 'datetime.datetime' and 'NoneType'
ERROR: resolve fwd_from TypeError("unhashable type: 'PeerChannel'")
Traceback (most recent call last):
  File "/home/maskray/.local/lib/python3.9/site-packages/telethon/client/updates.py", line 467, in _dispatch_update
    await callback(event)
  File "/home/maskray/projects/telegramircd/./telegramircd.py", line 2059, in on_telegram_update
    await getattr(TelegramUpdate, name)(self, update)
  File "/home/maskray/projects/telegramircd/./telegramircd.py", line 1685, in UpdateNewChannelMessage
    await server.on_telegram_update_message(update, update.message)
  File "/home/maskray/projects/telegramircd/./telegramircd.py", line 2065, in on_telegram_update_message
    sender, to = await self.resolve_from_to(msg)
  File "/home/maskray/projects/telegramircd/./telegramircd.py", line 2049, in resolve_from_to
    from_ = await server.ensure_special_user(msg.from_id, None)
  File "/home/maskray/projects/telegramircd/./telegramircd.py", line 1986, in ensure_special_user
    if user_id in self.user_id2special_user:
TypeError: unhashable type: 'PeerUser'
INFO: Sleeping for 24s (0:00:24) on GetParticipantsRequest flood wait
ERROR: resolve fwd_from TypeError("unhashable type: 'PeerChannel'")
ERROR: resolve fwd_from TypeError("unhashable type: 'PeerChannel'")
ERROR: resolve fwd_from TypeError("unhashable type: 'PeerChannel'")
ERROR: resolve fwd_from TypeError("unhashable type: 'PeerChannel'")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants