3

When I upload some files with non-latin names I got error:

UnicodeEncodeError at /profiles/
'ascii' codec can't encode characters in position 39-41: ordinal not in range(128)

I've tried change supervisor environment how it's described here, but it didn't help. I've added this line in /etc/supervisor/supervisord.conf:

[supervisord]
environment=LANG="ru_RU.utf8", LC_LANG="ru_RU.UTF-8", LC_ALL="ru_RU.UTF-8"
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor            ; ('AUTO' child log dir, default $TEMP)

When I put this line in program specific conf file it did not begin working too.

I've tried figure out my encoding, so I've add to template context this variable:

context['locale'] = sys.getfilesystemencoding()

and in template it shows "ANSI_X3.4-1968"

Could please someone explain why changing environment did not solve the problem?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Sergey Cherepanov
  • 629
  • 2
  • 7
  • 19

1 Answers1

3

Make sure you have completely restarted supervisord, as described here. Hope it helps!

Psion
  • 115
  • 4