Comments (9)
@LeoDJ @tvdstaaij
I have submitted a pull request to vysheng/tgl/pull#106 which would fix the underlying problem with tgl_do_load_photo which is called load_photo in telegram-cli that causes the client to crash when requesting an Empty Message thus fixing telegram-history-dump.
from telegram-history-dump.
I'm afraid this is a telegram-cli issue. SIGNAL received
basically means it crashed unexpectedly, no implicit conversion of nil into String
means my script got no response from telegram-cli to its load_photo
command but tried to parse it anyway.
You can probably reproduce this issue with just telegram-cli by doing this:
- Create a JSON dump with telegram-history-dump (you probably have one already) without downloading media
- Identify one of the problematic images in the JSON files and note the 'id' property of the message object
- Start telegram-cli normally and enter the command
load_photo xxxxxx
, using the message id you found
I recommend filing this as a telegram-cli issue so it can hopefully get a proper fix. In the meantime, as a workaround, you could hack the script a bit to ignore images from ImageBot (assuming those are the only images triggering this crash). Specifically, after this check, you could add another one like this:
return if msg['from'] && msg['from']['username'] == 'ImageBot'
from telegram-history-dump.
Thanks, that fix worked (almost).
It got way further in downloading media. But at some point it crashed again...
I looked into the last file it created and found the first photo entry without a "file" attribute. And who would have thought, the message came from ImageBot... Only that it wasn't sent directly but forwarded π
So, I quickly threw in that piece of code:
return if msg['fwd_from'] && msg['fwd_from']['username'] == 'ImageBot'
and now it works like a charm π
Thanks again for the help, now all my data is safe.
tl;dr: For anyone who might come by this issue again, here are the two lines and where I added them:
def process_media(dialog, msg)
return unless msg.include?('media')
return if msg['from'] && msg['from']['username'] == 'ImageBot'
return if msg['fwd_from'] && msg['fwd_from']['username'] == 'ImageBot'
from telegram-history-dump.
@LeoDJ some additional background: I believe the issue you encountered is vysheng/tg#904. I had the same issue recently, probably caused by people sending gifs (which technically aren't actually gifs by the way, Telegram converts them to videos, heh). If you or anyone else runs into this again, try compiling rnhmjoj's fork or applying the workaround patch manually.
from telegram-history-dump.
Edit: Also happens when trying to backup a chat with many ImageBot-Images...
Therefore had to disable media downloading, which I really wanted to do :(
from telegram-history-dump.
Thanks, I will try that later
Really cool project btw, keep up the good work π
from telegram-history-dump.
Nice hacking. Too bad you didn't get the ImageBot images, I'm sure you had a strong emotional attachment to them π
from telegram-history-dump.
Thank you very much.
from telegram-history-dump.
@LeoDJ I keep on joining a lot of random channels and have yet to re-encounter this issue.
How does the fix work for you?
from telegram-history-dump.
Related Issues (20)
- parse : 765 error HOT 2
- Error: Too many open files HOT 1
- Resume dump?
- Switch to Telethon? HOT 1
- Formatting messages takes a long time, even for small updates
- Ability to dump the history of only one user HOT 2
- Period at the end of chat name causes crash HOT 2
- Marks messages as read
- > Assertion failed: (0), function tglf_fetch_message_media_new, file tgl/structures.c, line 944. HOT 3
- keep our backups after a group is deleted on Telegram
- Conversion error (string into nil) in json/common.rb HOT 1
- load error
- dump group format with plaintextοΌno user name HOT 1
- TypeError while dumping messages HOT 1
- Download Execution times out HOT 1
- Pull out my chat history HOT 1
- show message timestamp when dumping HOT 1
- can not find command 'channel_list' HOT 11
- [PATCH] Wrong timestamps in HTML output HOT 5
- Cannot dump anything: JSON::ParserError
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegram-history-dump.