2788: after update some old reviews fail to show diff view.

doth*****@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
Jan. 20, 2014
What version are you running?
1.6.13

What's the URL of the page containing the problem?
/r/383/diff/#index_header

What steps will reproduce the problem?
always produceable.


What is the expected output? What do you see instead?
  File "/usr/lib/python2.4/site-packages/Djblets-0.6.23-py2.4.egg/djblets/util/decorators.py", line 119, in render
    return self.tag_func(context, *args)
  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.6.13-py2.4.egg/reviewboard/diffviewer/templatetags/difftags.py", line 204, in diff_chunk_header
    if header['line'] >= line[1]:
TemplateSyntaxError: Caught TypeError while rendering: string indices must be integers


What operating system are you using? What browser?
shows in all browsers.

Please provide any additional information below.
Caught TypeError while rendering: string indices must be integers
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.6.13-py2.4.egg/reviewboard/diffviewer/views.py", line 270, in view_diff
    'diffviewer/diff_file_fragment.html')
  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.6.13-py2.4.egg/reviewboard/diffviewer/views.py", line 159, in build_diff_fragment
    return cache_memoize(key, func)
  File "/usr/lib/python2.4/site-packages/Djblets-0.6.23-py2.4.egg/djblets/util/misc.py", line 164, in cache_memoize
    data = lookup_callable()
  File "/usr/lib/python2.4/site-packages/ReviewBoard-1.6.13-py2.4.egg/reviewboard/diffviewer/views.py", line 148, in <lambda>
    RequestContext(request, context))
  File "/usr/lib/python2.4/site-packages/Django-1.3.3-py2.4.egg/django/template/loader.py", line 183, in render_to_string
    return t.render(Context(dictionary))
  File "/usr/lib/python2.4/site-packages/Django-1.3.3-py2.4.egg/django/template/base
#1 doth*****@gmai***** (Google Code) (Is this you? Claim this profile.)
behaviour also reproduceable occurs i.e. in partial diffs:
/r/373/diff/2/fragment/6386/?index=6&1351159979
chipx86
#2 chipx86
Restart your memcached and the problem will go away. A cache key didn't get bumped when the format of the diff cache changed. We'll deploy a fix in the next release.
  • +Confirmed
  • -Priority-Medium
    +Priority-High
    +Milestone-Release1.6.x
    +Component-DiffViewer
  • +chipx86
#3 doth*****@gmai***** (Google Code) (Is this you? Claim this profile.)
yes, this fixes the behaviour.
Maybe setup should point the user to restart memcached in such a case.

Tnx a lot.
chipx86
#4 chipx86
It's a bug. I'd rather fix it than have setup tell you to work around it :) (And if we knew about it before releasing, we'd have fixed it then.)
david
#5 david
This has been fixed for a long time.
  • -Confirmed
    +Fixed