1657: Diff viewer path2id missing attribute error in ReviewBoard 1.0.8 with Bazaar

robwa******@gmai***** (Google Code) (Is this you? Claim this profile.)
Jan. 22, 2014
What version are you running?

ReviewBoard 1.0.8

What's the URL of the page containing the problem?

http://10.1.0.25/r/3/diff/#index_header

What steps will reproduce the problem?
1. Go to "all my requests" and try to view a diff from any entry.
2.
3.

What is the expected output? What do you see instead?

I expect to see a diff. Instead I get a traceback:

'NoneType' object has no attribute 'path2id'

Traceback (most recent call last):
  File
"/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.8-py2.6.egg/reviewboard/diffviewer/views.py",
line 153, in view_diff
    interdiffset, highlighting, True)
  File
"/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.8-py2.6.egg/reviewboard/diffviewer/diffutils.py",
line 623, in get_diff_files
    large_data=True)
  File
"/usr/local/lib/python2.6/dist-packages/Djblets-0.6.2-py2.6.egg/djblets/util/misc.py",
line 166, in cache_memoize
    data = lookup_callable()
  File
"/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.8-py2.6.egg/reviewboard/diffviewer/diffutils.py",
line 622, in <lambda>
    enable_syntax_highlighting),
  File
"/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.8-py2.6.egg/reviewboard/diffviewer/diffutils.py",
line 344, in get_chunks
    old = get_original_file(filediff)
  File
"/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.8-py2.6.egg/reviewboard/diffviewer/diffutils.py",
line 251, in get_original_file
    large_data=True)[0]
  File
"/usr/local/lib/python2.6/dist-packages/Djblets-0.6.2-py2.6.egg/djblets/util/misc.py",
line 166, in cache_memoize
    data = lookup_callable()
  File
"/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.8-py2.6.egg/reviewboard/diffviewer/diffutils.py",
line 250, in <lambda>
    data = cache_memoize(key, lambda: [fetch_file(file, revision)],
  File
"/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.8-py2.6.egg/reviewboard/diffviewer/diffutils.py",
line 229, in fetch_file
    data = tool.get_file(file, revision)
  File
"/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.8-py2.6.egg/reviewboard/scmtools/bzr.py",
line 47, in get_file
    raise SCMError(e)
SCMError: 'NoneType' object has no attribute 'path2id'

What operating system are you using? What browser?

Ubuntu Linux 9.0.4
Mozilla Firefox 3.6.3, but that's irrelevant.

Please provide any additional information below.

Same issue occurs with Bazaar 2.0.4 through versions to the 2.2 beta 1.
Using Python 2.6
Using file cache instead of Memcache
chipx86
#1 chipx86
Looks like this is failing to return a valid tree:

tree, branch, relpath = bzrdir.BzrDir.open_containing_tree_or_branch(filepath)

Can you show the repository path and the filename(s) in the diff?
  • +NeedInfo
  • +Component-SCMTools
david
#2 david
  • -NeedInfo
    +Incomplete
#3 julian*******@gmai***** (Google Code) (Is this you? Claim this profile.)
I just reproduced this on my Review Board 1.5 RC2 instance using a bzr+ssh repo.  I don't know if RB is handling that repo correctly (since creating a review request by manually uploading a diff is my first test), but I at least managed to successfully configure the repo in RB.

After hitting the "Create Review Request" button it reloads the page and tells me in red letters:

    'NoneType' object has no attribute 'path2id'

and the "Diff" upload field is cleared.

I can perform more testing if necessary.
#5 julian*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Here's the (correct) stack trace from my Apache error log.
  • +
    mod_wsgi (pid=3913): Callback registration for signal 2 ignored.
      File "/usr/local/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/core/handlers/wsgi.py", line 241, in __call__
        response = self.get_response(request)
      File "/usr/local/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/core/handlers/base.py", line 100, in get_response
        response = callback(request, *callback_args, **callback_kwargs)
      File "/usr/local/lib/python2.6/site-packages/Djblets-0.6.4-py2.6.egg/djblets/auth/util.py", line 46, in _checklogin
        return view_func(request, *args, **kwargs)
      File "/usr/local/lib/python2.6/site-packages/ReviewBoard-1.5rc2-py2.6.egg/reviewboard/reviews/views.py", line 68, in new_review_request
        parent_diff_file=request.FILES.get('parent_diff_path'))
      File "/usr/local/lib/python2.6/site-packages/ReviewBoard-1.5rc2-py2.6.egg/reviewboard/reviews/forms.py", line 197, in create
        attach_to_history=True)
      File "/usr/local/lib/python2.6/site-packages/ReviewBoar
#6 julian*******@gmai***** (Google Code) (Is this you? Claim this profile.)
The repository path is "bzr+ssh://anonbzr@<hostname>/trunk/".

The diff changes one file, "config/database.yml.sample".
#7 julian*******@gmai***** (Google Code) (Is this you? Claim this profile.)
I also tried using a *local* bzr repository, but I get the same behavior, so this is not specific to bzr+ssh repos.
#8 julian*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Can someone please reopen this issue, or should I file a new one about the same issue?
david
#9 david
  • -Incomplete
    +New
david
#10 david
This hasn't been an issue in several years, and I believe it was a bzrlib problem (either that or everyone has jumped ship from bzr).
  • -New
    +ThirdParty