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 500 - Server Error #171

Closed
aislanrs opened this issue Sep 4, 2018 · 3 comments
Closed

Error 500 - Server Error #171

aislanrs opened this issue Sep 4, 2018 · 3 comments

Comments

@aislanrs
Copy link

aislanrs commented Sep 4, 2018

Hi.

I've installed CKAN 2.8.1 on centos and after ckanext-ldap plugin was installed I can't send my data set to datastore anymore.

According to CKAN's log, the error is being returned by "/ckan/lib/default/src/ckan/ckan/authz.py" on method "is_authorized", that shows many expections as follow:

[Mon Sep 03 17:30:07.395171 2018] [:error] [pid 38375] 2018-09-03 17:30:07,395 INFO [ckan.lib.base] /dataset/0caa2639-12df-4081-b617-7ffc8187468d/resource/782ba2b1-76c1-47f3-9fb8-a49f2b2831cd/download/result_poc_v2_0116.csv render time 0.058 seconds
[Mon Sep 03 17:30:08.073511 2018] [:error] [pid 38375] 2018-09-03 17:30:08,072 ERROR [ckan.views.api] Authorization function not found: datastore_create
[Mon Sep 03 17:30:08.073548 2018] [:error] [pid 38375] Traceback (most recent call last):
[Mon Sep 03 17:30:08.073550 2018] [:error] [pid 38375] File "/ckan/lib/default/src/ckan/ckan/views/api.py", line 286, in action
[Mon Sep 03 17:30:08.073552 2018] [:error] [pid 38375] result = function(context, request_data)
[Mon Sep 03 17:30:08.073554 2018] [:error] [pid 38375] File "/ckan/lib/default/src/ckan/ckan/logic/init.py", line 464, in wrapped
[Mon Sep 03 17:30:08.073555 2018] [:error] [pid 38375] result = action(context, data_dict, **kw)
[Mon Sep 03 17:30:08.073557 2018] [:error] [pid 38375] File "/ckan/lib/default/src/ckan/ckanext/datastore/logic/action.py", line 99, in datastore_create
[Mon Sep 03 17:30:08.073559 2018] [:error] [pid 38375] p.toolkit.check_access('datastore_create', context, data_dict)
[Mon Sep 03 17:30:08.073560 2018] [:error] [pid 38375] File "/ckan/lib/default/src/ckan/ckan/logic/init.py", line 303, in check_access
[Mon Sep 03 17:30:08.073562 2018] [:error] [pid 38375] data_dict)
[Mon Sep 03 17:30:08.073563 2018] [:error] [pid 38375] File "/ckan/lib/default/src/ckan/ckan/authz.py", line 206, in is_authorized
[Mon Sep 03 17:30:08.073565 2018] [:error] [pid 38375] raise ValueError(
('Authorization function not found: %s' % action))
[Mon Sep 03 17:30:08.073567 2018] [:error] [pid 38375] ValueError: Authorization function not found: datastore_create
[Mon Sep 03 17:30:08.104461 2018] [:error] [pid 38375] 2018-09-03 17:30:08,104 ERROR [ckan.views.api] Authorization function not found: datapusher_submit
[Mon Sep 03 17:30:08.104492 2018] [:error] [pid 38375] Traceback (most recent call last):
[Mon Sep 03 17:30:08.104495 2018] [:error] [pid 38375] File "/ckan/lib/default/src/ckan/ckan/views/api.py", line 286, in action
[Mon Sep 03 17:30:08.104496 2018] [:error] [pid 38375] result = function(context, request_data)
[Mon Sep 03 17:30:08.104498 2018] [:error] [pid 38375] File "/ckan/lib/default/src/ckan/ckan/logic/init.py", line 464, in wrapped
[Mon Sep 03 17:30:08.104500 2018] [:error] [pid 38375] result = action(context, data_dict, **kw)
[Mon Sep 03 17:30:08.104501 2018] [:error] [pid 38375] File "/ckan/lib/default/src/ckan/ckanext/datapusher/logic/action.py", line 189, in datapusher_hook
[Mon Sep 03 17:30:08.104503 2018] [:error] [pid 38375] p.toolkit.check_access('datapusher_submit', context, metadata)
[Mon Sep 03 17:30:08.104505 2018] [:error] [pid 38375] File "/ckan/lib/default/src/ckan/ckan/logic/init.py", line 303, in check_access
[Mon Sep 03 17:30:08.104506 2018] [:error] [pid 38375] data_dict)
[Mon Sep 03 17:30:08.104508 2018] [:error] [pid 38375] File "/ckan/lib/default/src/ckan/ckan/authz.py", line 206, in is_authorized
[Mon Sep 03 17:30:08.104509 2018] [:error] [pid 38375] raise ValueError(
('Authorization function not found: %s' % action))
[Mon Sep 03 17:30:08.104511 2018] [:error] [pid 38375] ValueError: Authorization function not found: datapusher_submit

Thanks.

@aislanrs
Copy link
Author

I've looked to #40 and I found the solution. At the pull request #31 I identified that there is a pull request on CKAN (ckan/ckan#4248) that has some fixes on file authz.py. I've applied those changes into my authz.py file and it worked.

@aislanrs aislanrs reopened this Sep 17, 2018
@aislanrs
Copy link
Author

@jqnatividad
Copy link
Contributor

You may also want to check out https://github.com/ckan/ckanext-xloader.

ckan/ckan#4415

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

2 participants