Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#9136 closed defect (fixed)

MultiRepos Top level browser view + View Changes causes exception

Reported by: Carsten Klein <carsten.klein@…> Owned by: Remy Blank
Priority: normal Milestone: 0.12
Component: general Version: 0.12dev
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I have a local trac installation where I have set up multiple repositories (trac-0.12dev).

When navigating to the repository browser, it will display the top level repository view, i.e. the repositories that have been registered with the system.

The template will also diplay a "View changes" button.

Clicking on that button yields

Oops…
Trac detected an internal error:

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

This is probably a local installation issue.
Found a bug in Trac?

If you think this should work and you can reproduce the problem, you should consider creating a bug report.

Before you do that, though, please first try searching for similar issues, as it is quite likely that this problem has been reported before. For questions about installation and configuration of Trac or its plugins, please try the mailing list instead of creating a ticket.

Otherwise, please ==== How to Reproduce ==== While doing a GET operation on `/diff`, Trac issued an internal error. ''(please provide additional details here)'' Request parameters: {{{ {'new_path': u'/', 'new_rev': u'', 'old_path': u'/', 'old_rev': u''} }}} User Agent was: `Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.7) Gecko/20100106 Ubuntu/9.10 (karmic) Firefox/3.5.7` ==== System Information ==== || '''`Trac`''' || `0.12dev-r0` || || '''`Python`''' || `2.6.4 (r264:75706, Dec 7 2009, 18:59:58) ` [[br]] `[GCC 4.4.1]` || || '''`setuptools`''' || `0.6c11` || || '''`pytz`''' || `2009l` || || '''`SQLite`''' || `3.6.16` || || '''`pysqlite`''' || `2.4.1` || || '''`Genshi`''' || `0.6dev-r0` || || '''`Babel`''' || `0.9.4` || || '''`mod_python`''' || `3.3.1` || || '''`Pygments`''' || `1.0` || || '''`Subversion`''' || `1.6.5 (r38866)` || || '''`jQuery`''' || `1.4.1` || ==== Enabled Plugins ==== || '''`TracThemeEngine`''' || `2.0.1` || || '''`TracTocMacro`''' || `11.0.0.3` || ==== Python Traceback ==== {{{ Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/Trac-0.12dev_r0-py2.6.egg/trac/web/main.py", line 495, in _dispatch_request dispatcher.dispatch(req) File "/usr/local/lib/python2.6/dist-packages/Trac-0.12dev_r0-py2.6.egg/trac/web/main.py", line 227, in dispatch resp = chosen_handler.process_request(req) File "/usr/local/lib/python2.6/dist-packages/Trac-0.12dev_r0-py2.6.egg/trac/versioncontrol/web_ui/changeset.py", line 1171, in process_request new_rev = new_repos.normalize_rev(new_rev) AttributeError: 'NoneType' object has no attribute 'normalize_rev' }}} a new bug report describing the problem and explain how to reproduce it.
Python Traceback
Most recent call last:

    * File "/usr/local/lib/python2.6/dist-packages/Trac-0.12dev_r0-py2.6.egg/trac/web/main.py", line 495, in _dispatch_request
      Code fragment:
      Line	
      490	try:
      491	if not env and env_error:
      492	raise HTTPInternalError(env_error)
      493	try:
      494	dispatcher = RequestDispatcher(env)
      495	dispatcher.dispatch(req)
      496	except RequestDone:
      497	pass
      498	resp = req._response or []
      499	 
      500	except HTTPException, e:
      Local variables:
      Name	Value
      dispatcher 	<trac.web.main.RequestDispatcher object at 0x7f4e90896dd0>
      e 	AttributeError("'NoneType' object has no attribute 'normalize_rev'",)
      env 	<trac.env.Environment object at 0x7f4e909106d0>
      env_error 	None
      exc_info 	(<type 'exceptions.AttributeError'>, AttributeError("'NoneType' object has ...
      faulty_plugins 	[]
      frames 	[]
      has_admin 	True
      message 	u"AttributeError: 'NoneType' object has no attribute 'normalize_rev'"
      plugins 	[]
      req 	<Request "GET u'/diff'">
      resp 	[]
      th 	'http://trac-hacks.org'
      traceback 	u'Traceback (most recent call last):\n File ...
      tracker 	'http://trac.edgewall.org'
    * File "/usr/local/lib/python2.6/dist-packages/Trac-0.12dev_r0-py2.6.egg/trac/web/main.py", line 227, in dispatch
      Code fragment:
      Line	
      222	raise HTTPBadRequest('Missing or invalid form '
      223	'token. Do you have cookies '
      224	'enabled?')
      225	 
      226	# Process the request and render the template
      227	resp = chosen_handler.process_request(req)
      228	if resp:
      229	if len(resp) == 2: # Clearsilver
      230	chrome.populate_hdf(req)
      231	template, content_type = \
      232	self._post_process_request(req, *resp)
      Local variables:
      Name	Value
      chosen_handler 	<trac.versioncontrol.web_ui.changeset.AnyDiffModule object at ...
      chrome 	<trac.web.chrome.Chrome object at 0x7f4e907ce2d0>
      err 	(<type 'exceptions.AttributeError'>, AttributeError("'NoneType' object has ...
      handler 	<trac.versioncontrol.web_ui.changeset.AnyDiffModule object at ...
      req 	<Request "GET u'/diff'">
      self 	<trac.web.main.RequestDispatcher object at 0x7f4e90896dd0>
    * File "/usr/local/lib/python2.6/dist-packages/Trac-0.12dev_r0-py2.6.egg/trac/versioncontrol/web_ui/changeset.py", line 1171, in process_request
      Code fragment:
      Line	
      1166	# -- normalize
      1167	new_reponame, new_repos, new_path = \
      1168	rm.get_repository_by_path(new_path)
      1169	old_reponame, old_repos, old_path = \
      1170	rm.get_repository_by_path(old_path)
      1171	new_rev = new_repos.normalize_rev(new_rev)
      1172	old_rev = old_repos.normalize_rev(old_rev)
      1173	 
      1174	# -- prepare rendering
      1175	data = {'new_path': '/' + pathjoin(new_repos.reponame, new_path),
      1176	'new_rev': new_rev,
      Local variables:
      Name	Value
      new_path 	'/'
      new_reponame 	''
      new_repos 	None
      new_rev 	u''
      old_path 	'/'
      old_reponame 	''
      old_repos 	None
      old_rev 	u''
      req 	<Request "GET u'/diff'">
      rm 	<trac.versioncontrol.api.RepositoryManager object at 0x7f4e909173d0>
      self 	<trac.versioncontrol.web_ui.changeset.AnyDiffModule object at ...

File "/usr/local/lib/python2.6/dist-packages/Trac-0.12dev_r0-py2.6.egg/trac/web/main.py", line 495, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/local/lib/python2.6/dist-packages/Trac-0.12dev_r0-py2.6.egg/trac/web/main.py", line 227, in dispatch
  resp = chosen_handler.process_request(req)
File "/usr/local/lib/python2.6/dist-packages/Trac-0.12dev_r0-py2.6.egg/trac/versioncontrol/web_ui/changeset.py", line 1171, in process_request
  new_rev = new_repos.normalize_rev(new_rev)

System Information:

User Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.7) Gecko/20100106 Ubuntu/9.10 (karmic) Firefox/3.5.7
Trac 	0.12dev-r0
Python 	2.6.4 (r264:75706, Dec 7 2009, 18:59:58) [GCC 4.4.1]
setuptools 	0.6c11
pytz 	2009l
SQLite 	3.6.16
pysqlite 	2.4.1
Genshi 	0.6dev-r0
Babel 	0.9.4
mod_python 	3.3.1
Pygments 	1.0
Subversion 	1.6.5 (r38866)
jQuery	1.4.1

I believe that the "View changes" button should be hidden from the top level browser view.

Attachments (0)

Change History (3)

comment:1 by Remy Blank, 15 years ago

Milestone: 0.12
Owner: set to Remy Blank

Confirmed. Even better would be to make the button work.

comment:2 by MADxHAWK, 15 years ago

Hi,

i can confirm this issue:

Errormessage after clicking on create new ticket:

Zum Reproduzieren

Beim Ausführen der Operation GET auf '/diff' hat Trac einen internen Fehler gemeldet.

this happens when clicking on view changes on top level

Anfrageparameter:

{'new_path': u'/', 'new_rev': u'', 'old_path': u'/', 'old_rev': u''}

Systeminformationen

Trac 0.12dev-r9344
Babel 1.0dev-r494
Genshi 0.6dev-r1096
mod_python 3.3.1
pysqlite 2.3.2
Python 2.5.2 (r252:60911, Jan 4 2009, 18:00:02)
[GCC 4.3.2]
setuptools 0.6c8
SQLite 3.5.9
Subversion 1.5.1 (r32289)
jQuery 1.4.2

Enabled Plugins

Python-Zurückverfolgungsinformationen

Traceback (most recent call last):
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 504, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 235, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-i686/egg/trac/versioncontrol/web_ui/changeset.py", line 1193, in process_request
    new_rev = new_repos.normalize_rev(new_rev)
AttributeError: 'NoneType' object has no attribute 'normalize_rev'

comment:3 by Remy Blank, 15 years ago

Resolution: fixed
Status: newclosed

This was only happening at the root of the source browser when no default repository was defined. Fixed in [9393].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.