ckan / ckanext-xloader

Express Loader - quickly load data into DataStore. A replacement for DataPusher.
GNU Affero General Public License v3.0
44 stars 50 forks source link

CKAN bad response. Status code: 404 Not Found. #55

Open kimepe opened 5 years ago

kimepe commented 5 years ago

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?

davidread commented 5 years ago

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

kimepe commented 5 years ago

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