Closed Bug 671162 Opened 14 years ago Closed 14 years ago

Things in templates that cannot be cached

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: stephend, Assigned: jbalogh)

References

()

Details

Sometimes, loading https://addons.allizom.org/he/firefox/i/extensions/web-development/ yields: Traceback (most recent call last): File "/data/amo_python/www/preview/zamboni/vendor/src/django/django/core/handlers/base.py", line 111, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/data/amo_python/www/preview/zamboni/apps/browse/views.py", line 181, in impala_extensions 'browse/impala/extensions.html') File "/data/amo_python/www/preview/zamboni/apps/browse/views.py", line 157, in _extensions return impala_category_landing(request, category) File "/data/amo_python/www/preview/zamboni/apps/browse/views.py", line 251, in impala_category_landing 'browse/impala/category_landing.html') File "/data/amo_python/www/preview/zamboni/apps/browse/views.py", line 242, in _category_landing 'search_cat': '%s,0' % category.type}) File "/data/amo_python/www/preview/zamboni/vendor/src/jingo/jingo/__init__.py", line 79, in render rendered = render_to_string(request, template, context) File "/data/amo_python/www/preview/zamboni/vendor/src/jingo/jingo/__init__.py", line 97, in render_to_string return template.render(**get_context()) File "/usr/lib/python2.6/site-packages/jinja2/environment.py", line 891, in render return self.environment.handle_exception(exc_info, True) File "/data/amo_python/www/preview/zamboni/apps/browse/templates/browse/impala/category_landing.html", line 3, in top-level template code {% set addon_sets = filter.all() %} File "/data/amo_python/www/preview/zamboni/apps/browse/templates/browse/impala/base_listing.html", line 1, in top-level template code {% extends "impala/base.html" %} File "/data/amo_python/www/preview/zamboni/templates/impala/base.html", line 141, in top-level template code {% block main_content %} File "/data/amo_python/www/preview/zamboni/templates/impala/base.html", line 146, in block "main_content" {% block content %}{% endblock %} File "/data/amo_python/www/preview/zamboni/apps/browse/templates/browse/impala/base_listing.html", line 46, in block "content" {% block primary %}{% endblock %} File "/data/amo_python/www/preview/zamboni/apps/browse/templates/browse/impala/category_landing.html", line 13, in block "primary" {{ addons[:3]|featured_grid }} File "/data/amo_python/www/preview/zamboni/vendor/src/jingo/jingo/__init__.py", line 147, in wrapper t = env.get_template(template).render(context) File "/usr/lib/python2.6/site-packages/jinja2/environment.py", line 891, in render return self.environment.handle_exception(exc_info, True) File "/data/amo_python/www/preview/zamboni/apps/addons/templates/addons/impala/featured_grid.html", line 1, in top-level template code {% cache addons %} File "/data/amo_python/www/preview/zamboni/apps/amo/ext.py", line 22, in _cache_support return sup(key, obj, timeout, extra, caller) File "/data/amo_python/www/preview/zamboni/vendor/src/django-cache-machine/caching/ext.py", line 74, in _cache_support return caching.base.cached_with(obj, caller, key, timeout) File "/data/amo_python/www/preview/zamboni/vendor/src/django-cache-machine/caching/base.py", line 278, in cached_with log.warning(u'%r cannot be cached.' % obj) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 22: ordinal not in range(128)
Blocks: 671142
This is bad because it's crashing and because caching is not happening.
Assignee: nobody → jbalogh
Whiteboard: [blocks 100% impala]
Target Milestone: --- → 6.1.7
Whiteboard: [blocks 100% impala] → [fuzzer]
Whiteboard: [fuzzer] → [blocks 100% impala][fuzzer]
I fixed the crash in https://github.com/jbalogh/django-cache-machine/commit/09653b9. Now I need to find out why it's not caching, but this doesn't block impala anymore. Bumping to the next milestone so I can consult the logs after it ships.
Whiteboard: [blocks 100% impala][fuzzer] → [fuzzer]
Target Milestone: 6.1.7 → 6.1.8
caching:WARNING '[<Addon: 85442: Chronicles of Riddick>, <Addon: 85444: Doomsday>, <Addon: 85445: boys over flowers 3>, <Addon: 85446: Michael vs Jason>, <Addon: 85467: Princess-Mononoke>, <Addon: 85478: Kodoma from princess Mononoke>]' cannot be cached. caching:WARNING 'None' cannot be cached. caching:WARNING '[<Review: Review object>, <Review: Review object>, <Review: Review object>]' cannot be cached. caching:WARNING '<generator object chunked at 0x2b572c8ddc80>' cannot be cached.
Summary: [traceback] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 22: ordinal not in range(128) → Things in templates that cannot be cached
Fixed the original bug, I'll investigate more if it looks like perf is hurting.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Verified FIXED.
Status: RESOLVED → VERIFIED
Whiteboard: [fuzzer]
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.