Ask Your Question
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

asked 2012-11-18 06:27:48 -0500

siovene gravatar image

updated 2012-11-18 10:46:10 -0500

Evgeny gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-11-18 10:53:17 -0500

Evgeny gravatar image

updated 2012-11-18 11:38:14 -0500

siovene gravatar image

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.

edit flag offensive delete link more

Comments

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

siovene gravatar imagesiovene ( 2012-11-18 11:38:47 -0500 )edit

@Evgeny, bump :-)

siovene gravatar imagesiovene ( 2012-11-28 02:03:32 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-11-18 06:27:48 -0500

Seen: 274 times

Last updated: Nov 18 '12