Closed blink-led closed 7 months ago
That seem to be a rather outdated Telethon as version 1.14.0
was released in May 2020 - ie before the Telegram introduced the chat history import feature in Jan 2021.
The last time I used this I was using 1.32.1
and it was working fine so please upgrade Telethon and try again.
Good! With 1.32.1
I passed this error... new one received now :(
Traceback (most recent call last):
File "telegram_import.py", line 243, in <module>
import_history(
File "telegram_import.py", line 192, in import_history
client(functions.messages.CheckHistoryImportPeerRequest(
File "/home/jferna16/.local/lib/python3.8/site-packages/telethon/sync.py", line 39, in syncified
return loop.run_until_complete(coro)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/home/jferna16/.local/lib/python3.8/site-packages/telethon/client/users.py", line 30, in __call__
return await self._call(self._sender, request, ordered=ordered)
File "/home/jferna16/.local/lib/python3.8/site-packages/telethon/client/users.py", line 87, in _call
result = await future
telethon.errors.rpcerrorlist.PeerIdInvalidError: An invalid Peer was used. Make sure to pass the right peer type and that the value is valid (for instance, bots cannot start conversations) (caused by CheckHistoryImportPeerRequest)
I'm trying to recover a personal chat from myself and other person... do you know if some else is needed?
Many thanks!!
You are getting back an error from Telegram servers that seem to indicate that the peer (--peer
) you're using is not valid. I typically used the exact phone number of the other person, but @ username should also be OK.
Trying your script, I'm experiencing some issue:
Any hint for solve that?
Module Telethon installed:
Thanks!