Closed
Bug 775264
Opened 12 years ago
Closed 12 years ago
[bedrock][traceback] UnicodeDecodeError: 'utf8' codec can't decode byte 0xee in position 0: invalid continuation byte
Categories
(www.mozilla.org :: General, defect)
www.mozilla.org
General
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: stephend, Assigned: rik)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [sb-sprint-1] u=user c=L10N p=2)
http://www.mozilla.org/ku/firefox/14.0.1/whatsnew/ triggers the following traceback:
Traceback (most recent call last):
File "/data/www/www.mozilla.org-django/bedrock/vendor/lib/python/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/data/www/www.mozilla.org-django/bedrock/vendor/lib/python/django/views/decorators/vary.py", line 22, in inner_func
response = func(*args, **kwargs)
File "/data/www/www.mozilla.org-django/bedrock/apps/firefox/views.py", line 76, in whatsnew_redirect
{'locales_with_video': locales_with_video})
File "/data/www/www.mozilla.org-django/bedrock/lib/l10n_utils/__init__.py", line 38, in render
return jingo.render(request, template, context, **kwargs)
File "/data/www/www.mozilla.org-django/bedrock/vendor/src/jingo/jingo/__init__.py", line 80, in render
rendered = render_to_string(request, template, context)
File "/data/www/www.mozilla.org-django/bedrock/vendor/src/jingo/jingo/__init__.py", line 98, in render_to_string
return template.render(**get_context())
File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 891, in render
return self.environment.handle_exception(exc_info, True)
File "/data/www/www.mozilla.org-django/bedrock/apps/firefox/templates/firefox/whatsnew.html", line 1, in top-level template code
{% extends "/firefox/base-resp.html" %}
File "/data/www/www.mozilla.org-django/bedrock/apps/firefox/templates/firefox/base-resp.html", line 1, in top-level template code
{% extends "base-resp.html" %}
File "/data/www/www.mozilla.org-django/bedrock/templates/base-resp.html", line 10, in top-level template code
<title>{% block page_title_prefix %}Mozilla — {% endblock %}{% block page_title %}{% endblock %}{% block page_title_suffix %} — mozilla.org{% endblock %}</title>
File "/data/www/www.mozilla.org-django/bedrock/apps/firefox/templates/firefox/whatsnew.html", line 6, in block "page_title"
{% block page_title %}{{ _('Welcome to Firefox') }}{% endblock %}
File "/data/www/www.mozilla.org-django/bedrock/lib/l10n_utils/helpers.py", line 34, in _
trans = translate(text, ctx['request'].langfiles)
File "/data/www/www.mozilla.org-django/bedrock/lib/l10n_utils/dotlang.py", line 62, in translate
trans = parse(path)
File "/data/www/www.mozilla.org-django/bedrock/lib/l10n_utils/dotlang.py", line 26, in parse
for line in lines:
File "/usr/lib64/python2.6/codecs.py", line 684, in next
return self.reader.next()
File "/usr/lib64/python2.6/codecs.py", line 615, in next
line = self.readline()
File "/usr/lib64/python2.6/codecs.py", line 530, in readline
data = self.read(readsize, firstline=True)
File "/usr/lib64/python2.6/codecs.py", line 477, in read
newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xee in position 0: invalid continuation byte
Assignee | ||
Comment 1•12 years ago
|
||
Pascal: The error is in ku/main.lang. I don't know how but it has been messed up.
Comment 2•12 years ago
|
||
It looks like the file as a buggy unicode line in the middle , I am going to fix but we need to file a follow up bug, we can't have the parser choke on a unicode character it doesn't understand and put the whole locale down, it can be intellectually satisfying but for our day to day operations, that's a major functional regression compared to our PHP parser...
Comment 3•12 years ago
|
||
pushed in in r10758 on dev (http://www-dev.allizom.org/b/ku/firefox/whatsnew/), pushed in r107660 on prod.
Comment 4•12 years ago
|
||
That's a fix on the .lang file but the proper fix should be in the parser, morphing this bug into a bedrock l10n bug
Blocks: bedrock-l10n
Summary: [traceback] UnicodeDecodeError: 'utf8' codec can't decode byte 0xee in position 0: invalid continuation byte → [bedrock][traceback] UnicodeDecodeError: 'utf8' codec can't decode byte 0xee in position 0: invalid continuation byte
Comment 5•12 years ago
|
||
and the page is now back http://www.mozilla.org/ku/firefox/14.0.1/whatsnew/
Reporter | ||
Comment 6•12 years ago
|
||
(In reply to Pascal Chevrel:pascalc from comment #5)
> and the page is now back http://www.mozilla.org/ku/firefox/14.0.1/whatsnew/
Anything left to do here, then? Can you take the bug and mark it fixed?
Comment 7•12 years ago
|
||
We have fixed the file encoding but the parser should have been able to process it or ignore it without breaking the whole app, I am lowering the priority but keep this bug as an l10n webdev bug to fix in the platform.
Severity: blocker → major
Updated•12 years ago
|
Whiteboard: [sb-sprint-1]
Updated•12 years ago
|
Assignee: nobody → anthony
Whiteboard: [sb-sprint-1] → [sb-sprint-1] u=user c=L10N p=2
Assignee | ||
Comment 8•12 years ago
|
||
So I worked on this a bit.
Pascal: Would you prefer the fallback to be something like:
F��licitations ! Votre Firefox a ��t�� mis �� jour.
or fallback to the English sentence?
Comment 9•12 years ago
|
||
I prefer the fallback with the black interrogation mark
Assignee | ||
Comment 10•12 years ago
|
||
Comment 11•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/bedrock
https://github.com/mozilla/bedrock/commit/2988e08eafe091ae729177a3c94f581f3f4966b2
Don't fail on decoding errors.
fix bug 775264
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
You need to log in
before you can comment on or make changes to this bug.
Description
•