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

Flask conversion #46

Closed
wants to merge 7 commits into from
Closed

Conversation

frafra
Copy link

@frafra frafra commented Feb 16, 2022

Support Python 3 and CKAN 2.9.
Work based on #42.

There are a couple of things I am not totally comfortable with, regarding the headers/https options and the missing database initialization command.

I tried to log in as an existing user via OAuth 2 on CKAN ~2.9.5 with Python 3, and it worked.

This was referenced Feb 16, 2022
@frafra
Copy link
Author

frafra commented Feb 17, 2022

It seems that the original PR is active again. Great! Closing mine.

@frafra frafra closed this Feb 17, 2022
@simao-silva
Copy link

I am using CKAN 2.9.5 with Python 3. When using this PR I get the error `AttributeError: 'Request' object has no attribute 'GET''. Any ideas in what could be the issue?
Here is the full traceback:

 Traceback (most recent call last):
   File "/srv/app/src/ckanext-oauth2/ckanext/oauth2/views.py", line 59, in callback
     user_name = oauth2helper.identify(token)
   File "/srv/app/src/ckanext-oauth2/ckanext/oauth2/oauth2.py", line 132, in identify
     access_token = bytes(token['access_token'])
 TypeError: string argument without an encoding
 
 During handling of the above exception, another exception occurred:
 
 Traceback (most recent call last):
   File "/usr/lib/python3.8/site-packages/flask/app.py", line 1949, in full_dispatch_request
     rv = self.dispatch_request()
   File "/usr/lib/python3.8/site-packages/flask/app.py", line 1935, in dispatch_request
     return self.view_functions[rule.endpoint](**req.view_args)
   File "/srv/app/src/ckanext-oauth2/ckanext/oauth2/views.py", line 71, in callback
     error_description = toolkit.request.GET.get('error_description')
   File "/usr/lib/python3.8/site-packages/werkzeug/local.py", line 347, in __getattr__
     return getattr(self._get_current_object(), name)
   File "/usr/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'

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

Successfully merging this pull request may close these issues.

3 participants