Opened 17 years ago

Last modified 17 years ago

#4834 closed

UnicodeEncodeError in admin change_form page — at Version 1

Reported by: perol.chen@… Owned by: Adrian Holovaty
Component: contrib.admin Version: dev
Severity: Keywords: UnicodeEncodeError
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Malcolm Tredinnick)

Hi,

when i open the change_form page in admin, i occur the error below:

  Request Method:  	GET[[BR]]

  Request URL: 	/admin/comment/comment/53/ [[BR]]

  Exception Type: 	UnicodeEncodeError[[BR]]

  Exception Value: 	'ascii' codec can't encode characters in position 4-10: ordinal not in range(128)[[BR]]

  Exception Location: 	C:\Python25\lib\site-packages\django\utils\encoding.py in force_unicode, line 40[[BR]]

  Python Executable: 	C:\Python25\python.exe[[BR]]

  Python Version: 	2.5.1[[BR]]


C:\Python25\lib\site-packages\django\utils\encoding.py in force_unicode
  37. if hasattr(s, '__unicode__'):
  38. s = unicode(s)
  39. else:
'''  40. s = unicode(str(s), encoding, errors) ...             #this is the error line'''
  41. elif not isinstance(s, unicode):
  42. s = unicode(s, encoding, errors)
  43. return s

perol.chen

Change History (1)

comment:1 by Malcolm Tredinnick, 17 years ago

Description: modified (diff)

(Fixed description formatting.)

What does the string "s" contain at the point of the error? If you click on the line that says "Local vars", you should be able to see its contents.

Note: See TracTickets for help on using tickets.
Back to Top