209: Diff errors are masked by VariableDoesNotExist

fore*****@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
Oct. 14, 2007
A patch that failed to apply (due to user error) caused a traceback due to
VariableNotFound.  The attached patch fixes the issue.  I'm sorry, I no
longer have the traceback available.

Note that this patch is actually for djblets, but I don't see where this is
maintained, so I've posted it here.
chipx86
#1 chipx86
The VariableDoesNotExist error is usually incorrect and due to something else that's
wrong. If you can reproduce this at all, it'd be appreciated. I'm afraid this patch
will just mask the real problem.

As for djblets, this is a good a place as any, but in the future patches should be
submitted to http://reviews.review-board.org/
chipx86
#2 chipx86
  • +chipx86
#3 data****@gmai***** (Google Code) (Is this you? Claim this profile.)
I get a similar error when I do a diff. I'm submitting the diff from a Windows PC
using post-review. I tried doing this using a diff file. I'm using subversion command
line tools v 1.4.4 on windows.
  • +
    Traceback (most recent call last):
    File "/usr/lib/python2.5/site-packages/django/template/__init__.py" in render_node
      754. result = node.render(context)
    File "/usr/share/reviewboard/djblets/util/decorators.py" in render
      84. args = [resolve_variable(var, context) for var in self.args]
    File "/usr/lib/python2.5/site-packages/django/template/__init__.py" in resolve_variable
      698. raise VariableDoesNotExist("Failed lookup for key [%s] in %r", (bits[0], current)) # missing attribute
      VariableDoesNotExist at /r/17/diff/
      Failed lookup for key [review_request] in [{'block': <Block Node: content. Contents: [<Text Node: ' '>, <djblets.util.decorators.BlockTagNode object at 0x8d19c4c>, <Text Node: ' '>, <djblets.util.decorators.BlockTagNode object at 0x8d19e8c>, <Text Node: ' <div id="diffs"> '>, <If node>, <Text Node: ' </div> <div id="comment'>, <Variable Node: diffset.revision>, <Text Node: '" /> <input id="id_shi'>, <If node>, <Text Node: '/>Ship It!<br /> <labe'>, <If node>,
david
#4 david
The change to djblets just hides the underlying issue.  Can one of you provide the
backtrace?
  • +NeedInfo
  • +Component-DiffViewer
chipx86
#5 chipx86
Has anyone encountered this since? I think we've covered most of the problems by now.
  • +Diff errors are masked by VariableDoesNotExist
david
#6 david
Assuming fixed.  Please reopen if you encounter this again.
  • -NeedInfo
    +Fixed