Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Xavier Ordoquy
Hi, Le mercredi 8 juin 2016 10:13:46 UTC+2, luisza14 a écrit : > > I am using supervisor and gunicorn for production run as fondomutual user. > > $ env | grep LANG > LANG=es_CR.UTF-8 > LANGUAGE=es_CR:es > Supervisor doesn't propagate the locales to its supervised processes. You need to set them

Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Michal Petrucha
On Wed, Jun 08, 2016 at 02:13:23AM -0600, Luis Zárate wrote: > I am using supervisor and gunicorn for production run as fondomutual user. > > $ env | grep LANG > LANG=es_CR.UTF-8 > LANGUAGE=es_CR:es Are you certain that when supervisord is started by init/systemd/upstart, it is also launched with

Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Luis Zárate
I am using supervisor and gunicorn for production run as fondomutual user. $ env | grep LANG LANG=es_CR.UTF-8 LANGUAGE=es_CR:es 2016-06-08 2:09 GMT-06:00 Luis Zárate : > After obj.save(). > > File > "/home/fondomutual/entornos/fomeucr/lib/python3.4/site-packages/django/db/models/base.py" > in

Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Luis Zárate
After obj.save(). File "/home/fondomutual/entornos/fomeucr/lib/python3.4/site-packages/django/db/models/base.py" in save_base 736. updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields) File "/home/fondomutual/entornos/fomeucr/lib/python3.4/site-pac

Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Luis Zárate
I am in Debian, in /etc/locale.gen es_CR.UTF-8 UTF-8 $ locale -a C C.UTF-8 es_CR.utf8 POSIX 2016-06-08 2:01 GMT-06:00 Luis Zárate : > $ python manage.py shell > > >>> import sys > >>> sys.getfilesystemencoding() > 'utf-8' > > > > 2016-06-08 1:57 GMT-06:00 Stephen J. Butler : > >> Have you tri

Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Stephen J. Butler
Whats the stack trace? On Wed, Jun 8, 2016 at 3:01 AM, Luis Zárate wrote: > $ python manage.py shell > > >>> import sys > >>> sys.getfilesystemencoding() > 'utf-8' > > > > 2016-06-08 1:57 GMT-06:00 Stephen J. Butler : > >> Have you tried this? >> >> https://docs.djangoproject.com/en/1.9/ref/unic

Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Luis Zárate
$ python manage.py shell >>> import sys >>> sys.getfilesystemencoding() 'utf-8' 2016-06-08 1:57 GMT-06:00 Stephen J. Butler : > Have you tried this? > > https://docs.djangoproject.com/en/1.9/ref/unicode/#files > > You probably have a system setup where ASCII is the filesystem encoding. > It te

Re: Non Ascii character in upload file crash in python 3

2016-06-08 Thread Stephen J. Butler
Have you tried this? https://docs.djangoproject.com/en/1.9/ref/unicode/#files You probably have a system setup where ASCII is the filesystem encoding. It tells you a way to fix that on Linux/Unix. On Wed, Jun 8, 2016 at 2:44 AM, Luis Zárate wrote: > Hi, > > I am having this issue in server pro

Non Ascii character in upload file crash in python 3

2016-06-08 Thread Luis Zárate
Hi, I am having this issue in server production, I developed with python 3 and with others fields work great but when file is involved I don't know how to intermediate and remove non ascii characters. Part of my stack trace is: Internal Server Error: /vistapublica/perfil/editar UnicodeEncodeErr