Telethon icon indicating copy to clipboard operation
Telethon copied to clipboard

Null values from group

Open Lunarelly opened this issue 9 months ago • 2 comments

Code that causes the issue

Code: async def __get_history(self) -> Any: await self.client.start(phone=self.phone) channel = await self.client.get_entity(int(self.group_username)) result = [] async for message in self.client.iter_messages(channel): result.append(message) return result

Expected behavior

Group data shouldnt be null

Actual behavior

Suddenly groups started to return none values for any statistics (excluding reactions), like views and etc Doesnt happen with channels, though. made new session, updated library, still appears

Traceback

No response

Telethon version

1.39.0

Python version

3.12

Operating system (including distribution name and version)

macOS Sequoia, Ubuntu 24.04

Other details

No response

Checklist

  • [x] The error is in the library's code, and not in my own.
  • [x] I have searched for this issue before posting it and there isn't an open duplicate.
  • [x] I ran pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip and triggered the bug in the latest version.

Lunarelly avatar Mar 11 '25 00:03 Lunarelly

You can try using GetHistoryRequest directly. If that also fails, the results you would get come directly from Telegram, and Telethon is not changing those in any way (other than adapting some input parameters where needed, all while respecting the intended values). This would mean it's something Telethon cannot "fix" and it's just the way Telegram's API works.

Lonami avatar Mar 11 '25 07:03 Lonami