#1086 closed defect (invalid)
[patch] UnicodeDecodeError: 'utf8' codec can't decode byte 0xa3 in position 28: unexpected code byte
Reported by: | Esaj | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | *.djangoproject.com | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa3 in position 28: unexpected code byte
I got this error today. I've attached a patch to make it ignore utf-8 decoding errors.
Traceback (most recent call last): File "/home/j/jason/django_src/django/core/handlers/base.py", line 74, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/home/j/jason/django_src/django/contrib/syndication/views.py", line 20, in feed feedgen = f(slug, request.path).get_feed(param) File "/home/j/jason/django_src/django/contrib/syndication/feeds.py", line 95, in get_feed feed.add_item( UnicodeDecodeError: 'utf8' codec can't decode byte 0xa3 in position 28: unexpected code byte
Attachments (2)
Change History (5)
by , 19 years ago
Attachment: | feeds.py.diff added |
---|
by , 19 years ago
Attachment: | feeds.py.2.diff added |
---|
comment:1 by , 19 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Ignoring Unicode errors is not a good solution. The solution is to fix the encoding of your data.
comment:2 by , 19 years ago
Component: | RSS framework → Django project website |
---|---|
Resolution: | invalid |
Status: | closed → reopened |
I guess you're right. I'm actually using the aggregator app from django_website, so maybe that needs patching so it encodes content data as utf-8
?
comment:3 by , 19 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
Note:
See TracTickets
for help on using tickets.
Oops, forgot to import the exception...