vzhd1701 / evernote-backup

Backup & export all Evernote notes and notebooks
MIT License
908 stars 69 forks source link

[Bug]: Exception caught while downloading note #95

Open SprickW opened 2 months ago

SprickW commented 2 months ago

evernote-backup version

1.9.3

What OS are you using?

Linux

OS Version / Linux distribution

Ubuntu 22.04 LTS

Bug description

With sync an exception is caught

Log excerpt

evernote-backup --verbose sync
Reading database en_backup.db...
Authorizing auth token, evernote backend...
Successfully authenticated as sprickw!
Current login will expire at 2024-10-17 16:19:30.
Syncing user notebooks...
User notebooks are up to date, nothing to sync!
Syncing linked notebooks...
184 note(s) to download...
Downloading 184 note(s)...
Sync worker threads: 5
Downloading note [94cce117-4098-403e-93d6-ffc73c7b9212]
Downloading note [95276799-fae5-4c75-8013-ca79d498e084]
Downloading note [954ada16-708c-4077-bb6e-f331c50de520]
Downloading note [96434cfa-0254-4891-849f-1ebf6937d207]
Downloading note [967f2151-ac18-46d1-bb11-90134fa9d051]
Downloading note [98e482c0-bb08-4de5-8fc7-cb021ef1a72f]
Exception caught while downloading note 'Distance Between Two Geo-Locations in Python - AskPython'!
Aborting, please wait...
Finished downloading note [954ada16-708c-4077-bb6e-f331c50de520]
Memory consumed: 0.0% [LIMIT 256 MB]
Finished downloading note [967f2151-ac18-46d1-bb11-90134fa9d051]
Memory consumed: 0.0% [LIMIT 256 MB]
Finished downloading note [95276799-fae5-4c75-8013-ca79d498e084]
Memory consumed: 0.001% [LIMIT 256 MB]
Finished downloading note [98e482c0-bb08-4de5-8fc7-cb021ef1a72f]
Memory consumed: 0.001% [LIMIT 256 MB]
Finished downloading note [94cce117-4098-403e-93d6-ffc73c7b9212]
Memory consumed: 0.002% [LIMIT 256 MB]
Traceback (most recent call last):
  File "/home/sprickw/.local/lib/python3.10/site-packages/evernote_backup/cli.py", line 305, in main
    cli()
  File "/home/sprickw/.local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/sprickw/.local/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/sprickw/.local/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/sprickw/.local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/sprickw/.local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/sprickw/.local/lib/python3.10/site-packages/evernote_backup/cli.py", line 211, in sync
    cli_app.sync(
  File "/home/sprickw/.local/lib/python3.10/site-packages/evernote_backup/cli_app.py", line 128, in sync
    note_synchronizer.sync()
  File "/home/sprickw/.local/lib/python3.10/site-packages/evernote_backup/note_synchronizer.py", line 215, in sync
    self._download_scheduled_notes(notes_to_sync)
  File "/home/sprickw/.local/lib/python3.10/site-packages/evernote_backup/note_synchronizer.py", line 359, in _download_scheduled_notes
    self._process_download_chunk(
  File "/home/sprickw/.local/lib/python3.10/site-packages/evernote_backup/note_synchronizer.py", line 387, in _process_download_chunk
    raise f_exc
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/sprickw/.local/lib/python3.10/site-packages/evernote_backup/note_synchronizer.py", line 136, in __call__
    note = self.download_note(note_id)
  File "/home/sprickw/.local/lib/python3.10/site-packages/evernote_backup/note_synchronizer.py", line 148, in download_note
    return self._note_client.get_note(note_id)
  File "/home/sprickw/.local/lib/python3.10/site-packages/evernote_backup/evernote_client_sync.py", line 39, in get_note
    note = self.note_store.getNote(
  File "/home/sprickw/.local/lib/python3.10/site-packages/evernote_backup/evernote_client.py", line 131, in wrapper
    return functools.partial(
  File "/home/sprickw/.local/lib/python3.10/site-packages/evernote_backup/evernote_client_util.py", line 28, in wrapper
    return fun(*args, **kwargs)
  File "/home/sprickw/.local/lib/python3.10/site-packages/evernote/edam/notestore/NoteStore.py", line 4142, in getNote
    return self.recv_getNote()
  File "/home/sprickw/.local/lib/python3.10/site-packages/evernote/edam/notestore/NoteStore.py", line 4172, in recv_getNote
    raise result.systemException
evernote.edam.error.ttypes.EDAMSystemException: EDAMSystemException(message='5b53afb00a51b8ec8238b8b62b60351c', errorCode=4, rateLimitDuration=None)
SprickW commented 1 month ago

The reason seems to be, that attachments were enclosed in the note, that couldn't be handled. I deleted them in the note and it works perfectly.

benjiwheeler commented 1 month ago

How did you find the note that had the error? Is there some way to look it up by that hex id?