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

error handling of incorrect verification code #33

Open
DancingQuanta opened this issue Jun 13, 2017 · 0 comments
Open

error handling of incorrect verification code #33

DancingQuanta opened this issue Jun 13, 2017 · 0 comments

Comments

@DancingQuanta
Copy link
Contributor

If the verification code is incorrect then an exception from click will occur in the backend.py.

Do you already have an API key for zotero-cli? [y/N]: n
Opening https://www.zotero.org/oauth/authorize?oauth_token=47cc66ba4789462517c6&notes_access=1&library_access=1&write_access=1&all_groups=read&name=zotero-cli in browser, please confirm.
Enter verification code: test
Traceback (most recent call last):
  File "C:\Users\andre\Anaconda3\Scripts\zotcli-script.py", line 11, in <module>
    load_entry_point('zotero-cli', 'console_scripts', 'zotcli')()
  File "C:\Users\andre\Anaconda3\lib\site-packages\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\andre\Anaconda3\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "C:\Users\andre\Anaconda3\lib\site-packages\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\andre\Anaconda3\lib\site-packages\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\andre\Anaconda3\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "c:\users\andre\repos\zotero-cli\zotero_cli\cli.py", line 86, in configure
    config['library_id']) = ZoteroBackend.create_api_key()
  File "c:\users\andre\repos\zotero-cli\zotero_cli\backend.py", line 122, in create_api_key
    click.fail("Error during API key generation.")
AttributeError: module 'click' has no attribute 'fail'

Thjs shows there needs to be a context passed to the backend eg ctx.

Also can I use local storage without API key?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant