TelegramTools / TLImporter

📲 Telegram Chat Importer: Import chats from WhatsApp or other services into Telegram
GNU Affero General Public License v3.0
127 stars 11 forks source link

"Something went wrong in Telegram's side." #1

Closed chromaticsequence closed 5 years ago

chromaticsequence commented 5 years ago

Something went wrong in Telegram's side. This is the full exception:

Cannot cast NoneType to any kind of InputPeer.

I had this problem while importing a whatsapp chat into my saved messages.

ferferga commented 5 years ago

Could you, please, attach TLImporter-log.log file?

chromaticsequence commented 5 years ago

TLImporter-log.log

ferferga commented 5 years ago

Are you trying to import the chat into a group/channel? Are you using Secret Mode or normal mode?

ferferga commented 5 years ago

I need to rebase the Telethon version and I was just planning to do it today, so maybe it fixes itself in the new version I republish.

chromaticsequence commented 5 years ago

I'm using normal mode and I wanted to import it to my saved messages. I tried selecting group/channel earlier but I didn't know, that I needed two telegram accounts. (I think it is saying it before but I didn't read.)

chromaticsequence commented 5 years ago

Okay great, I'm gonna try it with your new version.

ferferga commented 5 years ago

Okay great, I'm gonna try it with your new version.

The new version has been uploaded. Let me know how it goes! :) 👍

ferferga commented 5 years ago

Closing as there is no more news from @UnlegitApple . Re-open again if you (or somebody else) face this issue again.

GothLab commented 4 years ago

Hi ferferga! Trying to upload messages to saved messages in this format

17/01/2019 16:06:02: Giulia: Message

1) Tried 3.0-3.0.2 version no spaces in file path

2) Tried - Exact names (manualy created file) with, without : 17/01/2019 16:07:02: Giulia: Message 17/01/2019 16:08:02: Me: Message

3) Tried - file from examples

Still same error Cannot cast NoneType to any kind of InputPeer.

Any advice for me? Thanks

ferferga commented 4 years ago

@blacklovefly Please, attach the logs here

GothLab commented 4 years ago

TLImporter-log.log TLImporter-log.log TLImporter-log.log

GothLab commented 4 years ago

I've been able to send messages into "saved messages" by using my number as a 2nd contact

ferferga commented 4 years ago

It has been always a requirement to have both contacts added as mutual contacts to have all the features properly working. In fact, I thought it was written in the documentation somewhere but I couldn't find it, my fault (so, you pointed me to another thing I need to improve)

However, something changed and it seems to give problemas as well even for messages sent to yourself (LoL), so, for sure, something changed in Telegram's API to trigger this issue.

Thank you very much for discovering the solution yourself and sorry for all the inconveniencies. I already started cleaning up the code this past weekend just after you posted your issue (there is already a pile of issues I've been neglecting). The code is a total mess, stuff that happens when you start learning a language and you come back after some time, I suppose :D I hope to have finished the clean-up after the end of my exams.

Have a nice day!

ferferga commented 4 years ago

Btw, you had to convert the WhatsApp messages timestamps, right? As explained in #2

I would really like to know if WhatsApp regex changes from country to country, because I'm starting to have this impression as well.

GothLab commented 4 years ago

No need to be sorry. I appreciate your work. You ve got a great tool, man, thats for sure. it saved loads of time transporting 30k data lines.

I cant tell about whatsup chat structure, Ive copied "15/02/2018 16:52:04: ferferga: " from examples folder and added it to every line. For some reason writing it manualy didnt worked. =\

I wonder wherever it's possible to choose an group chat id instead of user, but I guess it's a spam tool with that.

_Also liked that if you closed the program after it send without hitting enter - it saves all user data which is convinient.

_flood limitations changed somehow so it triggered arround 1997 value, so it took 14 hours to transfer.