[ckan-dev] Encoding error

frederic.prieur at ville.montreal.qc.ca frederic.prieur at ville.montreal.qc.ca
Thu Feb 20 15:14:51 UTC 2014


Hi Marek, have you try to use the .encode('utf8')  or unicode() functions 
on your value ?

Here's one link that might help you: 
http://stackoverflow.com/questions/10288016/usage-of-unicode-and-encode-functions-in-python
---------------------------------------------------------------------------
Frédéric Prieur
Programmeur analyste - développement de systèmes 

Service Des Technologies D' Informations (STI)
Division Exploitation et évolution des applications
Ville de Montréal

Tél: (514) 872-4798
frederic.prieur at ville.montreal.qc.ca

P Avant d'imprimer, pensez à l'environnement.



De :    Marek Šplíchal <marek.splichal at gmail.com>
A :     CKAN Development Discussions <ckan-dev at lists.okfn.org>, 
Date :  2014-02-14 02:29
Objet : Re: [ckan-dev] Encoding error
Envoyé par :    "ckan-dev" <ckan-dev-bounces at lists.okfn.org>



remote document, for example: 
http://geoportal.gov.cz/php/micka/csw/?OUTPUTFORMAT=application%2Fxml&SERVICE=CSW&OUTPUTSCHEMA=http%3A%2F%2Fwww.isotc211.org%2F2005%2Fgmd&REQUEST=GetRecordById&VERSION=2.0.2&ID=
{331269C0-7ED8-4B25-8E5C-7573FCAE88A5}

Dne 13.2.2014 17:06, Adrià Mercader napsal(a):
> Hi Marek,
>
> I know these are harvested datasets and that there is an encoding
> issue, but we need to know where exactly in the code is happening,
> that's why we need the stack trace and ideally one of the remote
> documents that is causing the problem.
>
> Thanks,
>
> Adrià
>
> On 13 February 2014 07:06, Marek Šplíchal <marek.splichal at gmail.com> 
wrote:
>> Errors are from importing INSPIRE metadata through CSW server, there 
are
>> validation errors, but this is no problem - this data are not under
>> ISO19139.
>> Problem is, when i try look at Local content (for example -
>> http://SERVER/harvest/object/282c4d82-191e-45ef-9402-13ecf95a4254), i 
get
>> this error with 'ascii' codec.
>>
>> Marek Splichal
>>
>> Dne 12.2.2014 13:53, Adrià Mercader napsal(a):
>>
>>> Hi Marek,
>>>
>>> Can you check the full traceback in the paster development server
>>> window or the error logs?
>>>
>>> What remote document are you trying to harvest?
>>>
>>> Adrià
>>>
>>>
>>> On 11 February 2014 07:20, Marek Šplíchal <marek.splichal at gmail.com>
>>> wrote:
>>>> I have harvested data - there are some errors - when i try to look 
from
>>>> Error log at Local content, i get
>>>>
>>>> 500 Internal Server Error
>>>>
>>>> The server has either erred or is incapable of performing the 
requested
>>>> operation.
>>>>
>>>> An error occurred: ['ascii' codec can't encode character u'\u0148' in
>>>> position 1616: ordinal not in range(128)]
>>>>
>>>> Marek Splichal
>>>> _______________________________________________
>>>> ckan-dev mailing list
>>>> ckan-dev at lists.okfn.org
>>>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>>>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>> _______________________________________________
>>> ckan-dev mailing list
>>> ckan-dev at lists.okfn.org
>>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev

_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org
https://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140220/d4a57781/attachment-0003.html>


More information about the ckan-dev mailing list