Opened 18 years ago
Closed 18 years ago
#5661 closed (fixed)
UnicodeDecodeError while removing objects -> no ugettext import
| Reported by: | Maciej Wiśniowski | Owned by: | Yves Serrano |
|---|---|---|---|
| Component: | contrib.admin | Version: | newforms-admin |
| Severity: | Keywords: | unicode utils.py ugettext nfa-blocker | |
| Cc: | pigletto@… | Triage Stage: | Ready for checkin |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
File admin/util.py lacks import statement:
from django.utils.translation import ugettext as _
which causes UnicodeDecodeError.
Patch attached.
Attachments (1)
Change History (10)
by , 18 years ago
| Attachment: | patch_rev6442_unicode.diff added |
|---|
comment:1 by , 18 years ago
| Cc: | added |
|---|
comment:2 by , 18 years ago
| Owner: | changed from to |
|---|
comment:3 by , 18 years ago
I think problem is still there as in util.py file _(..) is used but is not explicitly imported.
comment:4 by , 18 years ago
Yes, it's used here:
and here:
without having been imported. Those are both under a "for related in opts.get_all_related_many_to_many_objects():" and and "if has_related_objs:" so you need to be deleting something with some many-to-many relations in order to trip the error.
comment:5 by , 18 years ago
| Component: | Contrib apps → Admin interface |
|---|---|
| Triage Stage: | Unreviewed → Ready for checkin |
comment:6 by , 18 years ago
| Keywords: | nfa-blocker added |
|---|
Regression from trunk that limits function and has a trivial fix, so marking blocking for merge.
comment:9 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
I also had this problem, but it seems it's gone away in the newer revisions (I looked at r6782)