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]: just errors? #112

Open
StefanLindow opened this issue Sep 25, 2024 · 12 comments
Open

[Bug]: just errors? #112

StefanLindow opened this issue Sep 25, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@StefanLindow
Copy link

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:
  1. putting username/password into command
  2. reinstalling python
  3. 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>
@StefanLindow StefanLindow added the bug Something isn't working label Sep 25, 2024
@StefanLindow
Copy link
Author

oh, should this be in the discussions?

@dgreen
Copy link

dgreen commented Sep 25, 2024

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.

@StefanLindow
Copy link
Author

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

@dgreen
Copy link

dgreen commented Sep 26, 2024

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

@StefanLindow
Copy link
Author

works.

(however, not I get a "Rate limit reached" after a while)

@wingman301
Copy link

wingman301 commented Oct 5, 2024

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!!

@zieglerjm
Copy link

zieglerjm commented Oct 10, 2024

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

@YohanLiu
Copy link

YohanLiu commented Nov 8, 2024

i have same error,Have you solved the problem yet?

@dgreen
Copy link

dgreen commented Nov 8, 2024

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

@zieglerjm
Copy link

zieglerjm commented Nov 8, 2024

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

@YohanLiu
Copy link

YohanLiu commented Nov 9, 2024

i use yinxiangbiji
not evernote

@rjl77
Copy link

rjl77 commented Nov 9, 2024

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")

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

6 participants