Il 08/10/2016 17:22, Stefan Wallner ha scritto:
Hello,
I am running a Django app on Ubuntu 16.04 LTS with NGINX and uwsgi. I am
receiving unicode errors which I believe to be cause by the filesystem encoding
reporting None when the app runs via uwsgi, where python run from command-line
itself reports it as ‘UTF-8’ as expected.
I am setting
env = LANG=en_US.UTF-8
env = LC_ALL=en_US.UTF-8
env = LC_LANG=en_US.UTF-8
env = LC_CTYPE=UTF-8
in my application’s .ini file and those environment variables seem to get
picked up properly. Still sys.getfilesystemencoding() is None.
The app is started via serviced, but I also tried running it as a local user
and had no luck.
From what Google finds setting the locale as above should fix the problem, but
it seems not in my case. Any pointers or suggestions would be welcome!
Without a stackstrace it's impossible to say. Couldn't is just be an application
error? If using python2 maybe you are just using byte strings instead of unicode
objects.
--
Riccardo Magliocchetti
@rmistaken
http://menodizero.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi