Azeirah / remarks

Extract highlights, scribbles, and annotations from PDFs marked with the reMarkable tablet. Export to Markdown and PDF
GNU General Public License v3.0
12 stars 2 forks source link

No `pages_list` when downloading document bundles via rmapi? #4

Closed j6k4m8 closed 1 month ago

j6k4m8 commented 2 months ago

Hi @Azeirah!! First wanted to thank you SO much for keeping this fork alive and functioning. It has been a real life-saver!

When I download a file using rmapi (from a 3.* software tablet), I get a directory that looks like this:

[uuid].content
[uuid].metadata
[uuid].pagedata
[uuid].pdf

If I try to run remarks [directory] [outdirectory], I get the following error message:

File ".../.venv/lib/python3.11/site-packages/remarks/Document.py", line 84, in pages_magnitude
    return math.floor(math.log10(len(self.pages_list))) + 1
                                 ^^^^^^^^^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()

Super weird — this happens both with notebooks I create on the reMarkable tablet as well as PDFs that I've uploaded and annotated. It also appears to be sporadic; at times, I get a perfect PDF generation, no issues.

Is this a familiar issue? Thought I'd ask before I dive in! Will share what I find.

j6k4m8 commented 1 month ago

Ok appears to be an issue with unzipping into tempfiles on Mac — I think this may be something that i can build an MVP for but almost certainly this is not a remarks issue and almost definitely not an issue with this fork. Closing, sorry for the ~spam~ "bonus" issue!