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.
Internal Server Error: /vistapublica/perfil/editar UnicodeEncodeError at /vistapublica/perfil/editar 'ascii' codec can't encode character '\xd1' in position 74: ordinal not in range(128)So, how can I fix this issue?.
FILES: foto = <ExcelInMemoryUploadedFile: ELI. ACUÑA 24 04 15.jpg (image/jpeg)>
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAG%2B5VyPwsBhF_YSp-Htg_P24x9R2L0nzGgb9bOxsLBRmOr%2BP6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD4ANxUNNePQXj16Z_dOAgpueSobT%2BP0SJSN09J%2B8B3D7qUGrg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAG%2B5VyO_utrotMx%2B6mHs3r3ttA09Vinkd4o0yi1168gTxYHGMw%40mail.gmail.com.
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-packages/django/db/models/base.py" in _save_table 798. for f in non_pks] File "/home/fondomutual/entornos/fomeucr/lib/python3.4/site-packages/django/db/models/base.py" in <listcomp> 798. for f in non_pks] File "/home/fondomutual/entornos/fomeucr/lib/python3.4/site-packages/django/db/models/fields/files.py" in pre_save 311. file.save(file.name, file, save=False) File "/home/fondomutual/entornos/fomeucr/lib/python3.4/site-packages/django/db/models/fields/files.py" in save 93. self.name = self.storage.save(name, content, max_length=self.field.max_length) File "/home/fondomutual/entornos/fomeucr/lib/python3.4/site-packages/django/core/files/storage.py" in save 53. name = self.get_available_name(name, max_length=max_length) File "/home/fondomutual/entornos/fomeucr/lib/python3.4/site-packages/django/core/files/storage.py" in get_available_name 89. while self.exists(name) or (max_length and len(name) > max_length): File "/home/fondomutual/entornos/fomeucr/lib/python3.4/site-packages/django/core/files/storage.py" in exists 294. return os.path.exists(self.path(name)) File "/home/fondomutual/entornos/fomeucr/lib/python3.4/genericpath.py" in exists 19. os.stat(path) Exception Type: UnicodeEncodeError at /vistapublica/perfil/editar Exception Value: 'ascii' codec can't encode character '\xd1' in position 74: ordinal not in range(128) Request information: GET: No GET data
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD4ANxU_5J7q5TSdzivvCEuMsmR_YJz%3Dk6nDUm5qpQ%3DRnEJWvQ%40mail.gmail.com.
I am using supervisor and gunicorn for production run as fondomutual user.
$ env | grep LANGLANG=es_CR.UTF-8
LANGUAGE=es_CR:es