Closed rhabbachi closed 8 months ago
I've run into the same issue and have the same questsions. The only difference in my setup is Python3.
The context that xloader's update_resouce
function in jobs.py
is sending to CKAN's resource_patch
is missing the "user" and "auth_user_obj" information, both of which are required by resource_patch
to construct a new context.
I can force that information into the context created in update_resource
and then the submission will complete, but doesn't seem very useful way to go about it.
Same. Here is the fix I'm using in my fork https://github.com/rjruizes/ckanext-xloader/commit/f56e451ac1b87eb3353285c4368b888d368d441d
--- context = {'model': model, 'session': model.Session, 'ignore_auth': True}
+++ context = {'model': model, 'session': model.Session, 'ignore_auth': True,
'user': None, 'auth_user_obj': None}
Correction: The user to use for background jobs is the site_user https://github.com/rjruizes/ckanext-xloader/commit/360f56a0b2a3847a525a9b33417346e39dc9bd04
This fix works for me. Thanks.
Any objections to closing this?
Hello,
I'm triggering a KeyError exception during any resource update. The data is pushed to the datastore correctly but updating the resource status is halted with the exception.
CKAN: 2.9.2 Python: 2.7 ckanext-xloader: 0.7
Is this a common error folks are getting or did I configure something incorrectly? Thank you for your help!