carderne / signal-export

Export your Signal chats to markdown files with attachments
Other
481 stars 50 forks source link

export crashes with a RecursionError #69

Closed reludy closed 2 years ago

reludy commented 2 years ago

Desktop (please complete the following information):

Describe the bug The program manages to copy and rename all attachments, crashes half way into creating HTML files, with the error "RecursionError: maximum recursion depth exceeded while calling a Python object".

To reproduce

  1. Followed the Easy Docker Method.
  2. Tried exporting my signal data.
  3. I have tried pagination (50, 100, 200) and no pagination; all result in the same error.
  4. output with verbose: Terminal Saved Output copy.txt

heads up: I am an extreme newbie, I have never touched any code nor do I know what any of this means; I just want to backup my signal data because it is very very very important to me. And I really appreciate everyone in this community working on third party tools to enable this

carderne commented 2 years ago

Hi @reludy. There seems to be some issue with converting the Markdown to HTML.

FYI it will still have successfully export the .md Markdown files, which you should find in the output directory. If you want, you can add the --no-html flag (just added in https://github.com/carderne/signal-export/commit/6f74b90937fed1130d7504489f7e7e6234435cdd) and you won't get any errors.

Edit I have now added code https://github.com/carderne/signal-export/commit/5ee7d327ad6fce67e146e7aea26c91cd84651a6e to catch the recursion error. If you run it again with verbose logging, you should see which message caused the issue. It should just leave that one as Markdown and convert all the rest.

If you can share the culprit (with private info removed) I can try to figure out why it broke the converter.

reludy commented 2 years ago

I can't thank you enough! Whatever you did helped tremendously.

Other issues (I wonder if I should open new issues for these here?):

  1. signal-export manages to export all messages and media from May 1st to present day. This behavior was the same two weeks ago, the export started from May 1st. However, my conversation starts on April 30th.

  2. Opening the html file completely crashes my MacBook and leaves it fully unresponsive. I assumed the media folder was at fault since it is 9 GB, so renaming it remedies the problem. What do you think?

carderne commented 2 years ago

Great!

  1. Do the April 30th messages show up in Signal desktop?
  2. I'm not surprised it doesn't work. Only solution would be to do the pagination via actually separate HTML files (right now it's just some trickery). I will keep this open as a reminder, but probably won't get to it any time soon.
reludy commented 2 years ago
  1. Yes, April 30th messages do not show up, I'm dumb.
  2. Okay gotcha.

Thank you again @carderne. You have been a lifesaver!