Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Got traceback on init-db #101

Open
nigel-parker opened this issue Jul 23, 2024 · 6 comments
Open

[Bug]: Got traceback on init-db #101

nigel-parker opened this issue Jul 23, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@nigel-parker
Copy link

evernote-backup version

1.9.3

What OS are you using?

MacOS

OS Version / Linux distribution

Sonoma 14.5

Bug description

Installed via homebrew. Got the following output from init-db:

Logging in to Evernote...
Traceback (most recent call last):
File "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/cli.py", line 305, in main
cli()
File "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/cli.py", line 158, in init_db
cli_app.init_db(
File "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/cli_app.py", line 38, in init_db
auth_token = get_auth_token(
^^^^^^^^^^^^^^^
File "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/cli_app_auth.py", line 56, in get_auth_token
return evernote_login_password(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/cli_app_auth_password.py", line 56, in evernote_login_password
auth_res = auth_client.login(auth_user, auth_password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/evernote_client_auth.py", line 27, in login
return self.user_store.authenticateLongSessionV2(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/evernote_client.py", line 138, in wrapper
return target_method_retry(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/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 "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/evernote_client_classes.py", line 294, in authenticateLongSessionV2
return self.recv_authenticateLongSession()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote/edam/userstore/UserStore.py", line 781, in recv_authenticateLongSession
raise result.systemException
evernote.edam.error.ttypes.EDAMSystemException: EDAMSystemException(message=None, errorCode=8, rateLimitDuration=None)

Log excerpt

No response

@nigel-parker nigel-parker added the bug Something isn't working label Jul 23, 2024
@drewmccal
Copy link

I'm also getting this bug as well. Both on the homebrew install and the Docker image. Might have to do with rate limiting on Evernote API's end. It would really stink if they are cracking down on people exporting.

@wokawoka
Copy link

wokawoka commented Jul 25, 2024

I am also experiencing the same issue on linux using both the last version installed through PIP and the last portable binary

@realgenekim
Copy link

realgenekim commented Jul 31, 2024

FWIW, I just got the same error using brew install. This is the first time trying to use this fantastic tool. Thank you!

PS: I've been manually trying to export a Skitch notebook as EMEX file with 12.5K images through the macOS app, which keeps failing midway through due to some error associated with a particular image. I mention this because the app is definitely exporting lots of data, maybe contributing to a rate-limit problem?

@ilundain
Copy link

ilundain commented Aug 1, 2024

Fix: Use the OAuth option: evernote-backup init-db --oauth
This will open a webpage to request authorization to provide the necessary oauth token for the script to run.

Explanation: username-password is no longer supported for 3rd party apps.

The .EDAMSystemException provides errorCode=8, which indicates Invalid Authorization, and specifically incorrect username and/or password.

However, the above is not due to invalid credentials, but rather EN rejecting the username-password authentication.

As per the log, the error is thrown by line 781 of UserStore.py, which runs in the authenticate() function (line 558), where it confirms that this authentication function is only only available to Evernote's internal applications, and 3rd party apps must use OAuth (line 563-566)

@spitalfields
Copy link

FYI for anyone perplexed simply use

evernote-backup init-db --oauth

and a web client will open for you to confirm say 1year authorization access to Evernote - click to confirm - and then this will close and the program will successfully initialize databases etc

@huyz
Copy link

huyz commented Aug 30, 2024

I didn't want to init-db; I only wanted to reauth.

I tried evernote-backup reauth --oauth and that worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants