[Bug]: just errors?
evernote-backup version
1.9.3
What OS are you using?
MacOS
OS Version / Linux distribution
MacOS 13.6.9
Bug description
- after install (via brew) I wanted to init-db, see log for what came back
- I tried:
- putting username/password into command
- reinstalling python
- reinstalling evernote-backup
Log excerpt
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 772, in recv_authenticateLongSession
raise x
thrift.Thrift.TApplicationException: <exception str() failed>
oh, should this be in the discussions?
After an install from Homebrew, I did
mkdir evernoteBackup
cd evernoteBackup
evernote-backup init-db --oauth -d ./en_db/en_backup.db
evernote-backup sync -d ./en_db/en_backup.db
where evernoteBackup was the directory I chose to put things. The --oauth line launches a browser (or something I don't remember now) to carry out the authentication step even though I was not using a Google or Apple account for Evernote.
thank you. I used this, the browser launch and I could login. however, database initialisation did not work.
Current login will expire at 2025-09-26 06:30:52. Initializing database en_backup.db... 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 50, in init_db storage = initialize_storage(database, force) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/cli_app_storage.py", line 52, in initialize_storage initialize_db(database_path) File "/usr/local/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote_backup/note_storage.py", line 64, in initialize_db db = sqlite3.connect(database_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sqlite3.OperationalError: unable to open database file
Sorry, it looks like I did not update my notes quite right, I think you will need to also make en_db
mkdir evernoteBackup
cd evernoteBackup
mkdir en_db
evernote-backup init-db --oauth -d ./en_db/en_backup.db
evernote-backup sync -d ./en_db/en_backup.db
works.
(however, not I get a "Rate limit reached" after a while)
Thank you dgreen!! This appears to be working for me too.
BTW I ran the sync command w/o the command extensions and that worked. I was getting a "database already exist" error when the command extenions were included.
Update: This worked for me. All of my Evernote folders/notes were exported as ENEX files, one for each folder. Thank you!!
I can't get past this error.
windows cmd: evernote-backup init-db --oauth -d ./en_db/en_backup.db
File "...\AppData\Local\Programs\Python\Python312\Lib\site-packages\thrift\compat.py", line 45, in str_to_binary return bytes(str_val, 'utf8') ^^^^^^^^^^^^^^^^^^^^^^ TypeError: encoding without a string argument
i have same error,Have you solved the problem yet?
Have you tried expressing the path in windows format?
instead of
evernote-backup init-db --oauth -d ./en_db/en_backup.db
using
evernote-backup init-db --oauth -d .\en_db\en_backup.db
i have same error,Have you solved the problem yet?
After creating the "en_db" folder, just saw that on this thread, now I am getting a "SSL: Certificate_Verify_Failed" error.
To fix that, create: c:\ProgramData\pip\pip.ini [global] trusted-host = www.evernote.com
i use yinxiangbiji not evernote
Sorry, it looks like I did not update my notes quite right, I think you will need to also make en_db
mkdir evernoteBackup cd evernoteBackup mkdir en_db evernote-backup init-db --oauth -d ./en_db/en_backup.db evernote-backup sync -d ./en_db/en_backup.db
Thanks -- this worked for me today. I just wanted to add the next step for anyone else who was stuck:
evernote-backup export -d en_db/en_backup.db export/ (I put my exported .enex files in a subdirectory called "export")
Thank you to @dgreen and @rjl77 whose comments helped me quickly export my Evernote to my local system!
So I am adding export to Markdown instructions to their steps to finish what my objective was. I did this on Mac Sequoia 15.2 Intel i9, only this and the evernote2md package both installed via brew.
Backup and export Evernote to ENEX
mkdir evernoteBackup
cd evernoteBackup
mkdir en_db
evernote-backup init-db --oauth -d ./en_db/en_backup.db
evernote-backup sync -d ./en_db/en_backup.db
evernote-backup export -d en_db/en_backup.db export/
ENEX to Markdown
I then used evernote2md from https://github.com/wormi4ok/evernote2md to export to markdown in a folder called evernoteBackup\enex2md\. I added Front Matter option so details for each note are within the note.
for enex_file in export/*.enex; do
# Get the base name without extension
base_name=$(basename "$enex_file" .enex)
# Create directory
mkdir -p "enex2md/$base_name"
# Convert the file
evernote2md "$enex_file" -o "enex2md/$base_name" --addFrontMatter
echo "Processed: $base_name"
done
Browsing Notes locally
I used JetBrain's Webstorm, which is currently free for non-commercial use, to browse the evernoteBackup\enex2md folder more-or-less mimicking Evernote UI.
I hope this helps someone else!
Fixed in the new version. OAuth will be used by default now, username/password login API is disabled by Evernote.