First time here? Check out the FAQ!
1

Your output encoding is not UTF-8, there may be issues with the software when anything is printed to the terminal or log files

Hi, I get the error message shown in the title when I run management commands on my AskBot installation.

My terminal is configured for UTF-8. What else could be wrong?

siovene's avatar
431
siovene
asked 2012-11-18 06:27:48 -0500
Evgeny's avatar
13.2k
Evgeny
updated 2012-11-18 10:46:10 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

In this case your python output encoding for stdout and stderr streams is not "utf-8". The message gives you a warning as whenever a non-ascii message is logged or printed to the standard output there will be an exception.

For example - statements like logging.debug('....') may cause 500 errors in this situation.

One solution to this is to have logging.debug('....').encode('utf-8')) everywhere - to make sure that you print just bytes, but this would be too tedious. Another - set the output encoding to 'utf-8' at run time.

Evgeny's avatar
13.2k
Evgeny
answered 2012-11-18 10:53:17 -0500
siovene's avatar
431
siovene
updated 2012-11-18 11:38:14 -0500
edit flag offensive 0 remove flag delete link

Comments

Thanks. Do you have any idea how to set the python encoding at run-time, like you said in your last paragraph?

siovene's avatar siovene (2012-11-18 11:38:47 -0500) edit

@Evgeny, bump :-)

siovene's avatar siovene (2012-11-28 02:03:32 -0500) edit
add a comment see more comments