Modify

Opened 4 years ago

Last modified 3 years ago

#8303 new defect

AttributeError: 'NoneType' object has no attribute 'get_youngest_rev'

Reported by: quique76 Owned by: eblot
Priority: normal Component: RevtreePlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.12

Description (last modified by rjollos)

I have installed the Trac 0.12 version.
And when i try to see the RevtreePlugin the following error appears:

AttributeError: 'NoneType' object has no attribute 'get_youngest_rev'

Attachments (0)

Change History (4)

comment:1 Changed 4 years ago by rjollos

  • Description modified (diff)

comment:2 Changed 4 years ago by Quiuqe76

I think that the problem is because the Trac 0.12 have several SVN repositories.

comment:3 Changed 4 years ago by anonymous

  • Severity changed from major to blocker

I have the same problem, here is the backtrace:

File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 511, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 237, in dispatch
  resp = chosen_handler.process_request(req)
File "build/bdist.linux-x86_64/egg/revtree/web_ui.py", line 246, in process_request
  return self._process_revtree(req)
File "build/bdist.linux-x86_64/egg/revtree/web_ui.py", line 295, in _process_revtree
  youngest = int(tracrepos.get_youngest_rev())

and here the relevant code snippet

292	 def _process_revtree(self, req):
293	"""Handle revtree generation requests"""
294	tracrepos = self.env.get_repository()
295	youngest = int(tracrepos.get_youngest_rev())

It looks like self.env.get_repository() does not return anything, probably as the original reporter said because multiple repositories are supported. This is from a 0.12.2 trac with the svn checkout of the 0.12 branch of the revtree plugin.

comment:4 Changed 3 years ago by Violator

self.env.get_repository() does report repository_dir from trac.ini
This variable is not set on a default installation, setting the value with full path prevents return of NULL when using self.env.get_repository()
On the other hand, setting this value will break multi-repo support

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.