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?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
siovene's avatar
431
siovene
asked 12 years ago
Evgeny's avatar
13.2k
Evgeny
updated 12 years ago

Comments

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 12 years ago
siovene's avatar
431
siovene
updated 12 years ago
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 (12 years ago)

@Evgeny, bump :-)

siovene's avatar siovene (12 years ago)
see more comments