vzhd1701 / evernote-backup

Backup & export all Evernote notes and notebooks
MIT License
1k stars 77 forks source link

[Bug]: DB sync fails due to exception with one specific note #90

Open coutard opened 6 months ago

coutard commented 6 months ago

evernote-backup version

evernote-backup, version 1.9.3

What OS are you using?

MacOS

OS Version / Linux distribution

macOS 13.5.1

Bug description

Hi, All my recent attempts at syncing the database have failed with an exception being systematically thrown for one specific EV note

Any ideas how I can debug or fix this issue ?

Thanks !

Log excerpt

xxx@xxxs-Mac-mini-M1 Downloads % evernote-backup sync --database "/Volumes/T7_BKP/Evernote/database.db"
Reading database database.db...
Authorizing auth token, evernote backend...
Successfully authenticated as xxx!
Current login will expire at 2025-02-22 15:55:03.
Syncing user notebooks...
User notebooks are up to date, nothing to sync!
Syncing linked notebooks...
6 note(s) to download...
Downloading 6 note(s)...
  [############------------------------]  2/6  00:00:03Exception caught while downloading note 'Automatically Trigger iPhone Low Power Mode Earlier - MacRumors'!
Aborting, please wait...

Traceback (most recent call last):
  File "/opt/homebrew/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/cli.py", line 305, in main
    cli()
  File "/opt/homebrew/opt/python-click/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/opt/python-click/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/opt/python-click/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/opt/python-click/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/opt/python-click/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/cli.py", line 211, in sync
    cli_app.sync(
  File "/opt/homebrew/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/cli_app.py", line 128, in sync
    note_synchronizer.sync()
  File "/opt/homebrew/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/note_synchronizer.py", line 215, in sync
    self._download_scheduled_notes(notes_to_sync)
  File "/opt/homebrew/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/note_synchronizer.py", line 359, in _download_scheduled_notes
    self._process_download_chunk(
  File "/opt/homebrew/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/note_synchronizer.py", line 387, in _process_download_chunk
    raise f_exc
  File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/note_synchronizer.py", line 136, in __call__
    note = self.download_note(note_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/note_synchronizer.py", line 148, in download_note
    return self._note_client.get_note(note_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/evernote_client_sync.py", line 39, in get_note
    note = self.note_store.getNote(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/evernote_client.py", line 131, in wrapper
    return functools.partial(
           ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/evernote_client_util.py", line 28, in wrapper
    return fun(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote/edam/notestore/NoteStore.py", line 4142, in getNote
    return self.recv_getNote()
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote/edam/notestore/NoteStore.py", line 4172, in recv_getNote
    raise result.systemException
evernote.edam.error.ttypes.EDAMSystemException: EDAMSystemException(message='90c9d7b2311c7e44fe0bf0a37a708791', errorCode=4, rateLimitDuration=None)