[ckan-dev] Insert automated data into Datastore

Lasse Vestergaard ibbernik at gmail.com
Thu Feb 14 11:31:03 UTC 2013


Hi again.

I have now come a little further:


> The first problem is that it seems like the JSON parsing won't accept æøå
> (danish letters). I havest from a CSV file and I know it's utf-8 encoded.
> When I look in the CKAN log I only get:
>
> Bad request data: Error decoding JSON data. Error:
> UnicodeDecodeError('utf8', 'h\xf8j', 1, 2, 'invalid start byte')
>
> h\xf8j should be "høj" and it's the \xf8 (ø) that is the problem.
>

The above has not been solved yet. Any suggestions?


>
> I have tried to change the text so that æøå isn't present. I'm programming
> in Java and I then get this message:
>
> java.io.FileNotFoundException
>
> When I look in the CKAN log, I don't get any information.
>
> I'm using CKAN 2.0b and the action api (api/3/action/datastore_upsert -
> version 3).
>
> I haven't created the datastore to the resource yet, but that shoulnd't
> result in this kind of reponse, right? This means that I am expecting an
> error because of the missing datastore, but the errors seems to happen
> before I even get to the part where CKAN finds out that the datastore is
> not created.
>

I found out that it was my java inputStreaming that was of ( check
getInputStream vs. getErrorStream if you ever run into something similar).
When I found out that this was the problem, then I found out that the
actual problem was that I hadn't created the datastore yet (surprise :-) ).

/Lasse

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130214/9c45b0a4/attachment-0001.html>


More information about the ckan-dev mailing list