Skip to content

"Scope has changed": 'Request' object has no attribute 'GET' #49

@frafra

Description

@frafra
Traceback (most recent call last):
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/ckanext/oauth2/views.py", line 58, in callback
    token = oauth2helper.get_token()
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/ckanext/oauth2/oauth2.py", line 117, in get_token
    token = oauth.fetch_token(self.token_endpoint,
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py", line 244, in fetch_token
    self._client.parse_request_body_response(r.text, scope=self.scope)
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 448, in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 441, in parse_token_response
    validate_token_parameters(params)
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 471, in validate_token_parameters
    raise w
Warning: Scope has changed from "email profile openid" to "https://www.googleapis.com/auth/userinfo.profile openid https://www.googleapis.com/auth/userinfo.email".

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/ckanext/oauth2/views.py", line 71, in callback
    error_description = toolkit.request.GET.get('error_description')
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/werkzeug/local.py", line 347, in __getattr__
    return getattr(self._get_current_object(), name)
  File "/usr/lib/ckan/venv/lib/python3.8/site-packages/werkzeug/local.py", line 347, in __getattr__
    return getattr(self._get_current_object(), name)
AttributeError: 'Request' object has no attribute 'GET'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions