Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unicode with accents raising UnicodeDecodeError on logging (App Engine)

I'm trying to make a change to an old appengine application, but now after formating my pc and installing updated tools the logging functions are raising a unicode error.

In the previous development environment everything worked fine. ubuntu 9.04 python2.6 google appengine sdk 1.5

Now I'm trying make a change using this environment: ubuntu 11.10 python2.7 google appengine sdk 1.6

In this new development environment I'm getting errors using logging functions.

logging.info(u'Gerando lista de exibição') # error

Error:

'ascii' codec can't decode byte 0xc3 in position 22: ordinal not in range(128) args = ('ascii', 'Gerando lista de exibi\xc3\xa7\xc3\xa3o', 22, 23, 'ordinal not in range(128)') encoding = 'ascii' end = 23 message = '' object = 'Gerando lista de exibi\xc3\xa7\xc3\xa3o...' reason = 'ordinal not in range(128)' start = 22

To work I need remove accents:

logging.info(u'Gerando lista de exibicao') # ok

My editor is utf-8 and all my scripts have "coding: utf-8" as first line.

This is a version problem? There is some settings to do?

like image 263
Yoshio Avatar asked Nov 12 '11 20:11

Yoshio


1 Answers

It's a bug:

http://code.google.com/p/googleappengine/issues/detail?id=6266

Hopefully it will be corrected in next version (1.6.1).

like image 79
Yoshio Avatar answered Oct 20 '22 01:10

Yoshio