Open ravidziv opened 11 years ago
0 down vote favorite
I am trying to upload a json file to my acount in Datahub.io with ckanclient, and I got this error:
ckanclient.CkanApiError: Got redirected to another URL, which does not work with POSTS. Redirection: http://thedatahub.org/api/storage/auth/form/2013-07-26T022918/my.json -> http://datahub.io/user/login?came_from=http://datahub.io/api/storage/auth/form/2013-07-26T022918/my.json
The code I use is this (This is the same code as in the API)
import ckanclient
ckan = ckanclient.CkanClient(api_key='8a482c44-ef3d-4337-88c6-dca16fd6b3f3',) ckan.upload_file('my.json')
What am I doing wrong?
Have you tried (in the CkanClient constructor) to set base_location to 'http://datahub.io/api' ?
0 down vote favorite
I am trying to upload a json file to my acount in Datahub.io with ckanclient, and I got this error:
ckanclient.CkanApiError: Got redirected to another URL, which does not work with POSTS. Redirection: http://thedatahub.org/api/storage/auth/form/2013-07-26T022918/my.json -> http://datahub.io/user/login?came_from=http://datahub.io/api/storage/auth/form/2013-07-26T022918/my.json
The code I use is this (This is the same code as in the API)
import ckanclient
ckan = ckanclient.CkanClient(api_key='8a482c44-ef3d-4337-88c6-dca16fd6b3f3',) ckan.upload_file('my.json')
What am I doing wrong?