[ckan-dev] Cant create DXF resource from ckanclient api
Lars Johan Ilver
LJI at odense.dk
Wed Jun 29 11:32:28 UTC 2016
I'm trying to create DXF resources using ckanclient API.
DXF resources is in ASCII format.
I get Server 500. Looking into Python errors and code indicates that it is the DXF format that cause the troubles.
import ckanclient
created_resource = odoSite.action.resource_create(package_id='0966d84a-4222-4ade-b2bf-6fe062906a26', url='dummy.dk', name=namstr, upload=open(ss))
It's the same if I try to read the file as binary: upload=open(ss, 'rb')
The only documentation for the "mode string" I have been able to find is this error, when pasing some illegal value:
ValueError: mode string must begin with one of 'r', 'w', 'a' or 'U'
Any advice appreciated. ( Anyone that knows what a complete list of "mode strings"? Do I need to use another ckan api module?)
Thanks
/ilver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160629/c4de6999/attachment-0002.html>
More information about the ckan-dev
mailing list