Opened 18 years ago
Last modified 15 years ago
#3924 closed
Caught an exception while rendering: 'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128) — at Initial Version
Reported by: | Owned by: | hugo | |
---|---|---|---|
Component: | contrib.admin | Version: | 1.0 |
Severity: | Keywords: | ||
Cc: | jm.bugtracking@…, antoni.aloy@…, mpjung@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hello, after update the django code from svn, my admin site doesn´t work. The error is : Caught an exception while rendering: 'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128).
My models.py has a correct coding declaration, it is # -*- coding: UTF-8 -*-. My admin site allways works with previous svn revisions but it doesn´t work with the latest revision 4926 from the developer code. I´m working with language-code "es-es".
The problem is related with the use of non-ascii characters as the return value of str with models.ForeignKey and models.ManyToManyField.
Thank you very much.
Below youd can find a piece of code.
UnicodeDecodeError at /admin/articulos/articulo/add/
'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128)
Request Method: GET
Request URL: http://www..../admin/articulos/articulo/add/
Exception Type: UnicodeDecodeError
Exception Value: 'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128)
Exception Location: /home/rubenper/django/django/oldforms/init.py in render, line 490
Template error
In template /home/rubenper/django/django/contrib/admin/templates/widget/foreign.html, error at line 2
Caught an exception while rendering: 'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128)
1 {% load admin_modify adminmedia %}
2 {% output_all bound_field.form_fields %}