ckanext-xloader icon indicating copy to clipboard operation
ckanext-xloader copied to clipboard

CKAN bad response. Status code: 404 Not Found.

Open kimepe opened this issue 6 years ago • 2 comments

I just installer ckanext-exloader, in replacement to datapusher. When I tried to push resources to datastore, i got the following error message: CKAN bad response. Status code: 404 Not Found. At: http://localhost:8080/api/3/action/resource_show. status=404.

I would add that my ckan.site_url is set to http://localhost:8080 and I also have a ckan.root_path set to /ckan/.

I was expecting the datapusher to try its thing at http://localhost:8080/ckan/api/3/action/ but it seems as if it is not taking this into consideration.

What can I do?

Edit Seems as if updating [...]/ckanext-xloader/ckanext/xloader/action.py L72/L73 to site_url = config['ckan.site_url'] + config['ckan.root_path'] instead of just site_url = config['ckan.site_url'] does the trick.

Could it be possible to integrate the rooth_path in upcoming realeases in a cleaner way?

kimepe avatar Nov 02 '18 17:11 kimepe

I think you've found the problem and solution - nice! Are you able to do a pull request please?

davidread avatar Nov 03 '18 15:11 davidread

I'm not sure I can do it. May be I tried the wrong way. Anyway, here attached is the modified version of action.py which takes into consideration the Root Path, in case it has been set. Hope this helps. action.py.txt

kimepe avatar Nov 16 '18 19:11 kimepe