Re: [root button gnome org: Cron <root button> run-parts /etc/cron.daily]



On Wed, Feb 02, 2011 at 07:11:08PM +0100, Tobias Mueller wrote:
> Heya,
> 
> I haven't had a look at the scripts, but maybe I can still contribute
> something.
> 
> On 02.02.2011 15:29, Olav Vitters wrote:
> > Problem is the handling of encoded data.
> When you read() the data, immediately decode() it with the proper
> encoding so that the data will become a Unicode object, i.e.
> fileobject.read().decode('utf-8').

The UTF-8 is coming from http://git.gnome.org/repositories.doap (Máirín
Duffy). I'm not sure if Python sees that as UTF-8 or not. And perhaps
there is a mix of UTF-8 and non-UTF-8. How could I check the variables
what encoding Python thinks it is in? type(variable)?

At least I figured out how to reproduce the error on the server...

# /home/admin/bin/handle-ldap-modules sync
works

# /home/admin/bin/handle-ldap-modules sync | cat
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 1573: ordinal not in range(128)

(same error as forwarded)

-- 
Regards,
Olav


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]