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

[critical] "weaviate.exceptions.MissingScopeException" on every command #61

Open
dandv opened this issue Apr 4, 2023 · 3 comments
Open
Labels
bug Something isn't working

Comments

@dandv
Copy link
Contributor

dandv commented Apr 4, 2023

I get the error below on every weaviate command, including weaviate version:

Traceback (most recent call last):
  File "/home/dandv/.local/bin/weaviate", line 8, in <module>
    sys.exit(main())
  File "/home/dandv/.local/lib/python3.10/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/dandv/.local/lib/python3.10/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/dandv/.local/lib/python3.10/site-packages/click/core.py", line 1256, in invoke
    Command.invoke(self, ctx)
  File "/home/dandv/.local/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/dandv/.local/lib/python3.10/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/dandv/.local/lib/python3.10/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/dandv/.local/lib/python3.10/site-packages/cli.py", line 14, in main
    "config": Configuration(config_file)
  File "/home/dandv/.local/lib/python3.10/site-packages/semi/config/configuration.py", line 41, in __init__
    self.client = _create_client_from_config(self.config)
  File "/home/dandv/.local/lib/python3.10/site-packages/semi/config/configuration.py", line 81, in _create_client_from_config
    return weaviate.Client(config["url"], cred)
  File "/home/dandv/.local/lib/python3.10/site-packages/weaviate/client.py", line 146, in __init__
    self._connection = Connection(
  File "/home/dandv/.local/lib/python3.10/site-packages/weaviate/connect/connection.py", line 584, in __init__
    super().__init__(
  File "/home/dandv/.local/lib/python3.10/site-packages/weaviate/connect/connection.py", line 117, in __init__
    self._create_session(auth_client_secret)
  File "/home/dandv/.local/lib/python3.10/site-packages/weaviate/connect/connection.py", line 159, in _create_session
    self._session = _auth.get_auth_session()
  File "/home/dandv/.local/lib/python3.10/site-packages/weaviate/connect/authentication.py", line 69, in get_auth_session
    session = self._get_session_client_credential(self._credentials)
  File "/home/dandv/.local/lib/python3.10/site-packages/weaviate/connect/authentication.py", line 120, in _get_session_client_credential
    raise MissingScopeException
weaviate.exceptions.MissingScopeException

This happened after pip install weaviate-cli followed by weaviate version, which claimed "Config creation was complete":

No config was found, creating a new one.
Please give a weaviate url: https://shower-thoughts-osv1ce32.weaviate.network
Please choose:
1) No authentication
2) Client secret
3) Username and password
Enter number: 2
Please specify the client secret: 
Config creation complete


Traceback (most recent call last):
...
weaviate.exceptions.MissingScopeException
@dandv dandv added the bug Something isn't working label Apr 4, 2023
@dandv
Copy link
Contributor Author

dandv commented Jul 13, 2023

Breakage still present in v2.2.0, albeit in a different form - #64.

@cakesoft-chaitanya
Copy link

Facing same issue.

@othersideofphase
Copy link

othersideofphase commented Sep 16, 2023

I just installed the cli today to test on an M2 Mac running 13.5.2 (22G91) and have the same issue, although my config is defined correctly:

Note that I also encountered the issue in #64 but manually creating the directory was a workaround until that fix is released.

$ weaviate version
2.2.0

$ weaviate config view
{
    "url": "https://{sub-domain}.weaviate.network",
    "auth": {
        "type": "client_secret",
        "secret": "{secret-key}"
    }
}

$ weaviate ping
Traceback (most recent call last):
  File "/opt/homebrew/bin/weaviate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/semi/misc.py", line 21, in main_ping
    ping(get_client_from_context(ctx))
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/semi/utils.py", line 16, in get_client_from_context
    return ctx.obj["config"].get_client()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/semi/config/commands.py", line 103, in get_client
    return weaviate.Client(self.config["url"], cred)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/weaviate/client.py", line 150, in __init__
    self._connection = Connection(
                       ^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/weaviate/connect/connection.py", line 165, in __init__
    self._create_session(auth_client_secret)
  File "/opt/homebrew/lib/python3.11/site-packages/weaviate/connect/connection.py", line 222, in _create_session
    self._session = _auth.get_auth_session()
                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/weaviate/connect/authentication.py", line 76, in get_auth_session
    session = self._get_session_client_credential(self._credentials)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/weaviate/connect/authentication.py", line 127, in _get_session_client_credential
    raise MissingScopeException
weaviate.exceptions.MissingScopeException

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

3 participants