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]: init-db got error while --backend china #70

Open
laodouya opened this issue Jan 25, 2024 · 18 comments
Open

[Bug]: init-db got error while --backend china #70

laodouya opened this issue Jan 25, 2024 · 18 comments
Labels
bug Something isn't working

Comments

@laodouya
Copy link

evernote-backup version

1.9.3

What OS are you using?

MacOS

OS Version / Linux distribution

14.2.1

Bug description

The evernote-backup was installed using brew install.
After running evernote-backup init-db --backend china, entering the email and password results in the program throwing an error directly.

Log excerpt

evernote-backup init-db --backend china
Logging in to Evernote...
Username or Email: [email protected]
Password: 
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 158, in init_db
    cli_app.init_db(
  File "/opt/homebrew/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 "/opt/homebrew/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 "/opt/homebrew/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 "/opt/homebrew/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 "/opt/homebrew/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 "/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_backup/evernote_client_classes.py", line 294, in authenticateLongSessionV2
    return self.recv_authenticateLongSession()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/evernote-backup/1.9.3/libexec/lib/python3.12/site-packages/evernote/edam/userstore/UserStore.py", line 779, in recv_authenticateLongSession
    raise result.userException
evernote.edam.error.ttypes.EDAMUserException: EDAMUserException(errorCode=8, parameter='consumerKey')
@laodouya laodouya added the bug Something isn't working label Jan 25, 2024
@tainanl
Copy link

tainanl commented Jan 25, 2024

I got the same error.
evernote-backup version
1.9.3

What OS are you using?
Linux

python 3.8.10

test@test-pc:~$ evernote-backup init-db --backend china
Logging in to Evernote...
Username or Email: [email protected]
Password: 
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/evernote_backup/cli.py", line 305, in main
    cli()
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/evernote_backup/cli.py", line 158, in init_db
    cli_app.init_db(
  File "/usr/local/lib/python3.8/dist-packages/evernote_backup/cli_app.py", line 38, in init_db
    auth_token = get_auth_token(
  File "/usr/local/lib/python3.8/dist-packages/evernote_backup/cli_app_auth.py", line 56, in get_auth_token
    return evernote_login_password(
  File "/usr/local/lib/python3.8/dist-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/lib/python3.8/dist-packages/evernote_backup/evernote_client_auth.py", line 27, in login
    return self.user_store.authenticateLongSessionV2(
  File "/usr/local/lib/python3.8/dist-packages/evernote_backup/evernote_client.py", line 138, in wrapper
    return target_method_retry(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/evernote_backup/evernote_client_util.py", line 28, in wrapper
    return fun(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/evernote_backup/evernote_client_classes.py", line 294, in authenticateLongSessionV2
    return self.recv_authenticateLongSession()
  File "/usr/local/lib/python3.8/dist-packages/evernote/edam/userstore/UserStore.py", line 779, in recv_authenticateLongSession
    raise result.userException
evernote.edam.error.ttypes.EDAMUserException: EDAMUserException(errorCode=8, parameter='consumerKey')

@fangxia-
Copy link

fangxia- commented Jan 26, 2024

When I run the following instruction, I get a similar exception

evernote-backup version
1.9.3

What OS are you using?
Mac OS 13.5.1
python3.9


evernote-backup init-db --backend china --force

Logging in to Evernote...
Username or Email: [email protected]
Password:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/evernote_backup/cli.py", line 305, in main
cli()
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/evernote_backup/cli.py", line 158, in init_db
cli_app.init_db(
File "/usr/local/lib/python3.9/site-packages/evernote_backup/cli_app.py", line 38, in init_db
auth_token = get_auth_token(
File "/usr/local/lib/python3.9/site-packages/evernote_backup/cli_app_auth.py", line 56, in get_auth_token
return evernote_login_password(
File "/usr/local/lib/python3.9/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/lib/python3.9/site-packages/evernote_backup/evernote_client_auth.py", line 27, in login
return self.user_store.authenticateLongSessionV2(
File "/usr/local/lib/python3.9/site-packages/evernote_backup/evernote_client.py", line 138, in wrapper
return target_method_retry(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/evernote_backup/evernote_client_util.py", line 28, in wrapper
return fun(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/evernote_backup/evernote_client_classes.py", line 294, in authenticateLongSessionV2
return self.recv_authenticateLongSession()
File "/usr/local/lib/python3.9/site-packages/evernote/edam/userstore/UserStore.py", line 779, in recv_authenticateLongSession
raise result.userException
evernote.edam.error.ttypes.EDAMUserException: EDAMUserException(errorCode=8, parameter='consumerKey')

@Jason11Q
Copy link

me too, same error when run it in win11.

@J2eremy
Copy link

J2eremy commented Jan 28, 2024

me too

@liqingfeng-ola
Copy link

me too, on MacOS

@timelic
Copy link

timelic commented Feb 9, 2024

same issue

@labixx21
Copy link

labixx21 commented Feb 9, 2024

me too, on MacOS

@lethefrost
Copy link

lethefrost commented Feb 14, 2024

The same happens when running evernote-backup reauth... I found this documentation, not sure if it helps.

@lethefrost
Copy link

Hi @vzhd1701 , could you probably take a look at this issue? Your time and effort is greatly appreciated! We are not sure what's going wrong with the consumerKey. Is your developer API key expired or something? Did they change the API? Thank you so much for making this awesome library😊

@marchanbbb
Copy link

me too, on MacOS

@ymm135
Copy link

ymm135 commented Feb 28, 2024

me too on win11 @vzhd1701

@ymm135
Copy link

ymm135 commented Feb 28, 2024

不用等了,可以直接用历史版本导出就行,应该是2022年7月后版本不支持.
我下载印象笔记v6.22.60.4452就可以导出enex

@lethefrost
Copy link

I'm not sure why @facker289 's post was deleted, maybe it's because they harshly criticized yinxiangbiji's CEO 😂 But thank you so much it really works!🥹🥹 I'm finally able to get my notes synced with local database again after a long time!

It's a pity that post was gone. I'd just repeat here what they suggested, to help anyone else in need.

They pointed out that yinxiangbiji might has changed the tokens' policy. Exporting is no longer available using normal user login tokens. Follow the steps below to export your notes (or use the dev token as the authenticationToken parameter in any API).

  1. Get your developer token via this link - you will need to log in on the webpage and the token will expire after 7 days.
  2. Call evernote-backup commands with options -t or --token, followed by your developer token as its argument. So your command might look like one of the following:
    • evernote-backup init-db --backend china -t <your_developer_token>
    • evernote-backup reauth --token <your_developer_token>
  3. Now you can successfully run evernote-backup sync as you want!

@caiuskong
Copy link

Syncing user notebooks...
Rate limit reached. Restart program in 39:27.

@blurm
Copy link

blurm commented Apr 11, 2024

@lethefrost
Same error as @caiuskong

Syncing user notebooks...
  [####################################]  45571/45571
1084 note(s) to download...
Downloading 1084 note(s)...
  [################--------------------]  484/1084  00:03:28Exception caught while downloading note 'Back Workout'!
Aborting, please wait...

Rate limit reached. Restart program in 43:31.

@lethefrost
Copy link

@lethefrost Same error as @caiuskong

Syncing user notebooks...
  [####################################]  45571/45571
1084 note(s) to download...
Downloading 1084 note(s)...
  [################--------------------]  484/1084  00:03:28Exception caught while downloading note 'Back Workout'!
Aborting, please wait...

Rate limit reached. Restart program in 43:31.

Seems like it's the first time you run this command? I believe this is because you are downloading too many notes at one time and reached their servers' limit for that. You can try again later - the evernote-backup sync command is designed for differential/incremental synchronization, which means it should be able to resume from the stop point of your last downloading task, instead of from the very beginning. Let't me know if you're able to download the rest of the notes.

@icahuang
Copy link

icahuang commented Apr 17, 2024

I'm not sure why @facker289 's post was deleted, maybe it's because they harshly criticized yinxiangbiji's CEO 😂 But thank you so much it really works!🥹🥹 I'm finally able to get my notes synced with local database again after a long time!

It's a pity that post was gone. I'd just repeat here what they suggested, to help anyone else in need.

They pointed out that yinxiangbiji might has changed the tokens' policy. Exporting is no longer available using normal user login tokens. Follow the steps below to export your notes (or use the dev token as the authenticationToken parameter in any API).

  1. Get your developer token via this link - you will need to log in on the webpage and the token will expire after 7 days.

  2. Call evernote-backup commands with options -t or --token, followed by your developer token as its argument. So your command might look like one of the following:

    • evernote-backup init-db --backend china -t <your_developer_token>
    • evernote-backup reauth --token <your_developer_token>
  3. Now you can successfully run evernote-backup sync as you want!

It works. Thanks for ur help!
And yes for sure the CEO SUCKS.

@xjqwexj
Copy link

xjqwexj commented May 3, 2024

我不知道为什么@facker289帖子被删了,可能是因为他们严厉批评了印象笔记的CEO吧😂不过还是非常感谢,真的有用!🥹🥹时隔这么久,我的笔记终于可以再次同步到本地数据库了!
可惜那个帖子不见了。我只是在这里重复他们的建议,以帮助其他有需要的人。
他们指出,银象笔记可能改变了代币的政策。无法再使用普通用户登录令牌进行导出。按照以下步骤导出您的笔记(或使用开发令牌作为authenticationToken任何 API 中的参数)。

  1. 通过此链接获取您的开发者令牌- 您需要登录网页,令牌将在 7 天后过期。

  2. 使用选项或调用evernote-backup命令,后跟您的开发人员令牌作为其参数。因此您的命令可能类似于以下命令之一:-t``--token

    • evernote-backup init-db --backend china -t <your_developer_token>
    • evernote-backup reauth --token <your_developer_token>
  3. 现在你可以evernote-backup sync按照你想要的方式成功运行了!

有用。感谢你的帮助! 是的,首席执行官肯定很糟糕。

why "sqlite3.OperationalError: unable to open database file"??

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