Django

Code

Ticket #4141 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

TextFeld raises UnicodeDecodeError

Reported by: flavio.curella@gmail.com Assigned to: adrian
Milestone: Component: Database wrapper
Version: SVN Keywords: admin,unicode,decode, unicode-branch
Cc: Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

When trying to insert some text with non-ascii character into a TextField? from admin, Django throws this error:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/handlers/base.py" in get_response
  77. response = callback(request, *callback_args, **callback_kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/contrib/admin/views/decorators.py" in _checklogin
  55. return view_func(request, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  39. response = view_func(request, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/contrib/admin/views/main.py" in change_stage
  329. new_object = manipulator.save(new_data)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/db/models/manipulators.py" in save
  108. new_object.save()
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/polismus/aggregator/models.py" in save
  59. super(UserProfile, self).save()
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/db/models/base.py" in save
  223. db_values + [pk_val])
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/db/backends/util.py" in execute
  19. self.db.queries.append({

  UnicodeDecodeError at /admin/aggregator/userprofile/1/
  'ascii' codec can't decode byte 0xc5 in position 511: ordinal not in range(128)

Maybe this can be fixed only with the Unicode branch?

Attachments

Change History

04/24/07 07:46:47 changed by mtredinnick

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

This is exactly the sort of probem we are fixing on the unicode branch. I'll leave this open until that is merged, but it's not something to fix on trunk.

05/14/07 14:51:48 changed by mtredinnick

  • keywords changed from admin,unicode,decode to admin,unicode,decode, unicode-branch.

06/08/07 08:50:12 changed by zebziggle@yahoo.com

Any suggestions for a workaround on this?

06/08/07 08:53:22 changed by anonymous

Use the unicode branch. This is not going to be fixed on trunk until the branch is merged.

07/04/07 07:11:05 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(In [5609]) Merged Unicode branch into trunk (r4952:5608). This should be fully backwards compatible for all practical purposes.

Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702


Add/Change #4141 (TextFeld raises UnicodeDecodeError)




Change Properties
Action