Null values from group
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.zipand triggered the bug in the latest version.
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.