Telethon icon indicating copy to clipboard operation
Telethon copied to clipboard

telethon.errors.common.TypeNotFoundError: Could not find a matching Constructor ID

Open sladkoyy opened this issue 2 years ago • 1 comments

telethon version 1.24

Hello, i used "client.iter_messages" and got this error

Who know how to fix it?

messages = client.iter_messages(entity)

telethon.errors.common.TypeNotFoundError: Could not find a matching Constructor ID for the TLObject that was supposed to be read with ID 38116ee0. Most likely, a TLObject was trying to be read when it should not be read. Remaining bytes: b'\xe0n\x118\x80\x01\x80\x00\x00\xael\x00"\x17QYm\n86\x01\x00\x00\x00\x1e7\xa5\xa2\xb7\xee\x1eZ\x00\x00\x00\x00\xca=ab\xc0\xe6\x9c\x89\xe6\xb2\xa1\xe6\x9c\x89\xe7\xbc\xba\xe9\x92\xb1\xe7\x9a\x84\xe5\x85\x84\xe5\xbc\x9f \xe5\x85\xa8\xe6\x96\xb0\xe9\xa1\xb9\xe7\x9b\xae\xe6\x97\xa5\xe8\xb5\x9a2000\xe6\x8a\x96\xe9\x9f\xb3\xe5\xbc\x95\xe7\x90\x89\xe4\xb8\x8a\xe7\xb2\x89\xef\xbc\x8c\xe8\xae\xa1\xe6\x95\xb0\xe8\x84\x9a\xe6\x9c\xac\xe5\x85\xa8\xe9\x83\xa8\xe5\x85\x8d\xe8\xb4\xb9\xe4\xbd\xa0\xe5\x87\x86\xe5\xa4\x87\xe7\x94\xb5\xe8\x84\x91\xe5\xb0\xb1\xe8\xa1\x8c\xe8\xae\xbe\xe7\xbd\xae\xe5\xa5\xbd\xe4\xba\xba\xe5\xb7\xa5\xe9\x83\xa8\xe5\x88\x86\xe6\x8c\x82\xe6\x9c\xba\xe6\x93\x8d\xe4\xbd\x9c\xe6\x94\xaf\xe6\x8c\x81\xe8\xbe\xb9\xe4\xb8\x8a\xe8\xbe\xb9\xe7\xbb\x93\xe6\xac\xa2\xe8\xbf\x8e\xe5\xb7\xa5\xe4\xbd\x9c\xe5\xae\xa4\xe5\xaf\xb9\xe6\x8e\xa5 @wlpm1\x00\x00\x00\x15\xc4\xb5\x1c\x01\x00\x00\x00\x9dW\x04\xfaB\x00\x00\x00\x06\x00\x00\x00\xc2\x0f\xd6\x83\x00\x00\x00\x00\x00\x00\x00\x008&v\x008&v\x00\x01\x00\x00\x00\x15\xc4\xb5\x1c\x01\x00\x00\x00\xb0\xec\xf6?G\x00\x10\x00m\n86\x01\x00\x00\x00\xa22\x02bp\xdf\xa1\x02\x07Danique\x06Monika\x00\xf1Bo\xe2\x15\xc4\xb5\x1c\x01\x00\x00\x00a\xaca\x82@1D\x00\xb7\xee\x1eZ\x00\x00\x00\x00y$\xc4_\xff\x07\x06\xf4"\xe5\x8d\xb0\xe5\xba\xa6\xe6\x94\xaf\xe4\xbb\x98\xe5\x9c\x88\xe2\xad\x95\xef\xb8\x8f\xe5\xbc\x95\xe6\xb5\x81/\xe9\xa1\xb9\xe7\x9b\xae\x00\ryinduzhifuqun\x00\x00\x11\x1cn\x1c\x02\x00\x00\x00\x0e\xad1\x1b\xb4S\x01T\x14\x01\x08\x08\x8b0}\x91r\xa7\xcc\x0cz\x1a(\xa2\xa61Hm\x9f\x00\x00\x00\x05\x00\x00\x00\xa1\xb6\xff`\x18\x04\x12\x9f\xfc\x05\x02\x00\xff\xff\xff\x7f\x8a=ab\x00\x00\x00\x00' ERROR:telethon.network.mtprotosender:Unhandled error while processing msgs Traceback (most recent call last): File "C:\Users\One\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\network\mtprotosender.py", line 540, in _recv_loop await self._process_message(message) File "C:\Users\One\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\network\mtprotosender.py", line 555, in _process_message await handler(message) File "C:\Users\One\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\network\mtprotosender.py", line 644, in handle_gzip_packed message.obj = reader.tgread_object() File "C:\Users\One\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\extensions\binaryreader.py", line 142, in tgread_object return clazz.from_reader(self) File "C:\Users\One\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\tl\types_init.py", line 27864, in from_reader x = reader.tgread_object() File "C:\Users\One\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\extensions\binaryreader.py", line 142, in tgread_object return clazz.from_reader(self) File "C:\Users\One\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\tl\types_init.py", line 26226, in from_reader _message = reader.tgread_object() File "C:\Users\One\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\extensions\binaryreader.py", line 140, in tgread_object raise error

sladkoyy avatar Apr 21 '22 11:04 sladkoyy

https://github.com/LonamiWebs/Telethon/issues/1429

Thoufak avatar Apr 26 '22 12:04 Thoufak

Please try updating to the v1.25 available from PyPi. This issue should no longer be happening. It happens sometimes when Telegram sends incorrect objects.

Lonami avatar Sep 20 '22 12:09 Lonami