[ckan-dev] Datastore & filestore via API

Michele Barbera barbera at spaziodati.eu
Mon Aug 20 14:51:41 UTC 2012


>
>
>
>  Having seen it before, I suspect this is somehow related to not being
>> able to upload.
>> Is it possible? Any pointer for solving this?
>>
>
> It don't think it's related. Are you still not able to upload after
> cleaning the db? Same error?
>
>
no way. I've tried everything I can think ok. Here's my rights config:

(pyenv)ckan at vmi7739:~/pyenv/src/ckan$ paster roles
editor              read-site, read-user, create-user, edit,
create-package, create-group, create-authorization-group, read, file-upload
anon_editor         edit, create-package, create-user, read-user,
read-site, read, file-upload
reader              read-site, read-user, create-user, read

(pyenv)ckan at vmi7739:~/pyenv/src/ckan$ paster rights | grep barbz
User barbz -> is editor on -> Package radioattivita

Here's the code (as per https://github.com/okfn/ckanclient#ckanclient):

ckan = ckanclient.CkanClient(base_location='
http://pat-ckan.spaziodati.eu/api', api_key='MY-API-KEY-HERE')
ckan.add_package_resource('radioattivita', 'filediesempio.csv',
resource_type='data', description='some description')
ckan.upload_file('/Users/barbz/testapi/ckanclient/filediesempio.csv')

and the log (Traceback towards the end):
http://pastebin.com/i4uQEDsy

I've also tries with a sysadmin user (admin) and got the same result.

On the other hand the creating a new package and updating package and
resource metadata seems to work correctly.
Any idea?

Thanks,
michele



> ______________________________**_________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/**listinfo/ckan-dev<http://lists.okfn.org/mailman/listinfo/ckan-dev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20120820/f464e360/attachment-0001.html>


More information about the ckan-dev mailing list