Edgewall Software
Modify

Opened 15 years ago

Closed 11 years ago

Last modified 11 years ago

#433 closed defect (fixed)

Bitten & Trac 0.12

Reported by: anonymous Owned by: osimons
Priority: major Milestone: 0.7
Component: General Version: dev
Keywords: Cc: guillaume.kulakowski@…, jhampton, mpotter@…, jonathan@…, srl@…, myroslav@…
Operating System: Linux

Description (last modified by osimons)

Hi, I have got an issue with Bitten (from SVN Bitten 0.6dev) & Trac 0.12. Bitten is installed and when I try to add a Build Configuration in the admin panel, I have got the following error :

Trac detected an internal error:

AttributeError: 'NoneType' object has no attribute 'get_node'
Most recent call last:

    * File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 467, in _dispatch_request
      Code fragment:
       462. try:
       463. if not env and env_error:
       464. raise HTTPInternalError(env_error)
       465. try:
       466. dispatcher = RequestDispatcher(env)
       467. dispatcher.dispatch(req)
       468. except RequestDone:
       469. pass
       470. resp = req._response or []
       471.  
       472. except HTTPException, e:
      Local variables:
      Name	Value
      after 	[u' except RequestDone:', u' pass', u' resp = ...
      before 	[u' try:', u' if not env and env_error:', u' raise ...
      dispatcher 	<trac.web.main.RequestDispatcher object at 0x8dc578c>
      e 	<exceptions.AttributeError instance at 0x913756c>
      env 	<trac.env.Environment object at 0x8e9a68c>
      env_error 	None
      exc_info 	(<class exceptions.AttributeError at 0x858f74c>, ...
      filename 	'/usr/lib/python2.4/site-packages/trac/web/main.py'
      frames 	[{'function': '_dispatch_request', 'lines_before': [u' try:', u' ...
      has_admin 	True
      line 	u' dispatcher.dispatch(req)'
      lineno 	466
      message 	u"AttributeError: 'NoneType' object has no attribute 'get_node'"
      req 	<Request "POST u'/admin/bitten/configs'">
      resp 	[]
      tb 	<traceback object at 0x9132e3c>
      tb_hide 	None
      traceback 	u'Traceback (most recent call last):\n File ...
    * File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 212, in dispatch
      Code fragment:
       207. raise HTTPBadRequest('Missing or invalid form '
       208. 'token. Do you have cookies '
       209. 'enabled?')
       210.  
       211. # Process the request and render the template
       212. resp = chosen_handler.process_request(req)
       213. if resp:
       214. if len(resp) == 2: # Clearsilver
       215. chrome.populate_hdf(req)
       216. template, content_type = \
       217. self._post_process_request(req, *resp)
      Local variables:
      Name	Value
      chosen_handler 	<trac.admin.web_ui.AdminModule object at 0x8fbd64c>
      chrome 	<trac.web.chrome.Chrome object at 0x8f0d86c>
      ctype 	'application/x-www-form-urlencoded'
      err 	(<class exceptions.AttributeError at 0x858f74c>, ...
      handler 	<trac.admin.web_ui.AdminModule object at 0x8fbd64c>
      options 	{}
      req 	<Request "POST u'/admin/bitten/configs'">
      self 	<trac.web.main.RequestDispatcher object at 0x8dc578c>
    * File "/usr/lib/python2.4/site-packages/trac/admin/web_ui.py", line 114, in process_request
      Code fragment:
       109. if not provider:
       110. raise HTTPNotFound(_('Unknown administration panel'))
       111.  
       112. if hasattr(provider, 'render_admin_panel'):
       113. template, data = provider.render_admin_panel(req, cat_id, panel_id,
       114. path_info)
       115.  
       116. else: # support for legacy WebAdmin panels
       117. data = {}
       118. cstmpl, ct = provider.process_admin_request(req, cat_id, panel_id,
       119. path_info)
      Local variables:
      Name	Value
      _panel_order 	<function _panel_order at 0x90d4ed4>
      cat_id 	u'bitten'
      panel_id 	u'configs'
      panels 	[('general', 'General', 'basics', 'Basic Settings'), ('general', ...
      path_info 	None
      provider 	<bitten.admin.BuildConfigurationsAdminPageProvider object at 0x8fa60ac>
      providers 	{('bitten', 'configs'): <bitten.admin.BuildConfigurationsAdminPageProvider ...
      req 	<Request "POST u'/admin/bitten/configs'">
      self 	<trac.admin.web_ui.AdminModule object at 0x8fbd64c>
    * File "/usr/lib/python2.4/site-packages/bitten/admin.py", line 183, in render_admin_panel
      Code fragment:
       178. }
       179.  
       180. else: # At the top level build config list
       181. if req.method == 'POST':
       182. if 'add' in req.args: # Add build config
       183. config = self._create_config(req)
       184. req.redirect(req.abs_href.admin(cat, page, config.name))
       185.  
       186. elif 'remove' in req.args: # Remove selected build configs
       187. self._remove_configs(req)
       188.  
      Local variables:
      Name	Value
      cat 	u'bitten'
      config_name 	None
      data 	{}
      page 	u'configs'
      path_info 	None
      platform_id 	None
      req 	<Request "POST u'/admin/bitten/configs'">
      self 	<bitten.admin.BuildConfigurationsAdminPageProvider object at 0x8fa60ac>
    * File "/usr/lib/python2.4/site-packages/bitten/admin.py", line 228, in _create_config
      Code fragment:
       223.  
       224. def _create_config(self, req):
       225. req.perm.assert_permission('BUILD_CREATE')
       226.  
       227. config = BuildConfig(self.env)
       228. warnings = self._update_config(req, config)
       229. if warnings:
       230. if len(warnings) == 1:
       231. raise TracError(warnings[0], 'Add Configuration')
       232. else:
       233. raise TracError('Errors: %s' % ' '.join(warnings),
      Local variables:
      Name	Value
      config 	<BuildConfig None>
      req 	<Request "POST u'/admin/bitten/configs'">
      self 	<bitten.admin.BuildConfigurationsAdminPageProvider object at 0x8fa60ac>
    * File "/usr/lib/python2.4/site-packages/bitten/admin.py", line 268, in _update_config 

Attachments (1)

bitten_authz_patch2.patch (6.2 KB) - added by Steven R. Loomis <srl@…> 14 years ago.
FYI: Almost all of my patches against bitten r881 for trac0.12. (I am using this in production- cue scary music) - works around missing authz and fixes an earlier issue with timeline. Doesn't support multi-repos at all, other tickets for that.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 15 years ago by osimons

  • Description modified (diff)
  • Milestone changed from 0.6 to 0.6.1

The AttributeError I suppose is much of the same discussed in #342 - get_node() is a repository method. Bitten won't target Trac 0.12 with upcoming 0.6 release, so just rescheduling it slightly.

Are you using 0.12 'plain', or multirepos?

comment:2 Changed 15 years ago by hugobosscool26@…

I have tested both versions in fact and I have the same error.

comment:3 Changed 15 years ago by guillaume.kulakowski@…

  • Cc guillaume.kulakowski@… added

comment:4 Changed 15 years ago by jhampton

  • Cc jhamptoin added

Are you using SVN as the repository backend? or some other repository type?

comment:5 Changed 15 years ago by jhampton

  • Cc jhampton added; jhamptoin removed

yeah, I'm brilliant and managed to mess up my username when adding it to the CC list.

Dont' mind me, just fixing the CC list

comment:6 Changed 15 years ago by hugobosscool26

:) SVN Repositories yes.

comment:7 Changed 15 years ago by piotr@…

  • Milestone changed from 0.6.1 to 0.7

Same issue coming up again. This time Bitten 0.7dev_r811 and Trac 0.12dev_r9184. If there's any resolution, forgive me, but I cannot find it.

#   File "build/bdist.linux-i686/egg/trac/web/main.py", line 495, in  _dispatch_request
Local variables:
Name	Value
dispatcher 	<trac.web.main.RequestDispatcher object at 0xb9c1a12c>
e 	AttributeError("'NoneType' object has no attribute 'get_node'",)
env 	<trac.env.Environment object at 0xb9572fcc>
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 'get_node'"
plugins 	[]
req 	<Request "POST u'/admin/bitten/configs'">
resp 	[]
th 	'http://trac-hacks.org'
traceback 	u'Traceback (most recent call last):\n File ...
tracker 	'http://trac.edgewall.org'
# File "build/bdist.linux-i686/egg/trac/web/main.py", line 227, in dispatch
Local variables:
Name	Value
chosen_handler 	<trac.admin.web_ui.AdminModule object at 0xb9c22bec>
chrome 	<trac.web.chrome.Chrome object at 0xb982590c>
ctype 	'application/x-www-form-urlencoded'
err 	(<type 'exceptions.AttributeError'>, AttributeError("'NoneType' object has ...
handler 	<trac.admin.web_ui.AdminModule object at 0xb9c22bec>
options 	{}
req 	<Request "POST u'/admin/bitten/configs'">
self 	<trac.web.main.RequestDispatcher object at 0xb9c1a12c>
# File "build/bdist.linux-i686/egg/trac/admin/web_ui.py", line 115, in process_request
Local variables:
Name	Value
_panel_order 	<function _panel_order at 0xb9a81d14>
cat_id 	u'bitten'
panel_id 	u'configs'
panels 	[('general', u'General', 'basics', u'Basic Settings'), ('general', ...
path_info 	None
provider 	<bitten.admin.BuildConfigurationsAdminPageProvider object at 0xb9b5190c>
providers 	{('bitten', 'configs'): <bitten.admin.BuildConfigurationsAdminPageProvider ...
req 	<Request "POST u'/admin/bitten/configs'">
self 	<trac.admin.web_ui.AdminModule object at 0xb9c22bec>
# File "/usr/local/lib/python2.6/dist-packages/Bitten-0.7dev_r811-py2.6.egg/bitten/admin.py", line 195, in render_admin_panel
Code fragment:
Line	
190	}
191	 
192	else: # At the top level build config list
193	if req.method == 'POST':
194	if 'add' in req.args: # Add build config
195	config = self._create_config(req)
196	req.redirect(req.abs_href.admin(cat, page, config.name))
197	 
198	elif 'remove' in req.args: # Remove selected build configs
199	self._remove_configs(req)
200	 
Local variables:
Name	Value
cat 	u'bitten'
config_name 	None
data 	{}
page 	u'configs'
path_info 	None
platform_id 	None
req 	<Request "POST u'/admin/bitten/configs'">
self 	<bitten.admin.BuildConfigurationsAdminPageProvider object at 0xb9b5190c>
# File "/usr/local/lib/python2.6/dist-packages/Bitten-0.7dev_r811-py2.6.egg/bitten/admin.py", line 240, in _create_config
Code fragment:
Line	
235	 
236	def _create_config(self, req):
237	req.perm.assert_permission('BUILD_CREATE')
238	 
239	config = BuildConfig(self.env)
240	warnings = self._update_config(req, config)
241	if warnings:
242	if len(warnings) == 1:
243	raise TracError(warnings[0], 'Add Configuration')
244	else:
245	raise TracError('Errors: %s' % ' '.join(warnings),
Local variables:
Name	Value
config 	<BuildConfig None>
req 	<Request "POST u'/admin/bitten/configs'">
self 	<bitten.admin.BuildConfigurationsAdminPageProvider object at 0xb9b5190c>
# File "/usr/local/lib/python2.6/dist-packages/Bitten-0.7dev_r811-py2.6.egg/bitten/admin.py", line 280, in _update_config 

Trac 0.12dev-r9184 Python 2.6.2 (release26-maint, Apr 19 2009, 02:11:59) [GCC 4.3.3] setuptools 0.6c9 SQLite 3.6.10 pysqlite 2.4.1 Genshi 0.6dev-r1092 Babel 0.9.4 mod_python 3.3.1 Bitten 0.7dev-r811 Pygments 1.2.2 Subversion 1.5.4 (r33841) jQuery 1.3.2

comment:8 follow-up: Changed 15 years ago by anonymous

Hi,

Can you fix this defect?

when use multirepos, and create new Build Configuration, trac wrote:

AttributeError: 'NoneType' object has no attribute 'get_node'.

Trac 0.12dev-r9593 Bitten 0.7dev-r870 Subversion 1.6.11 (r934486) mod_python 3.3.2-dev-20080819

comment:9 in reply to: ↑ 8 Changed 15 years ago by osimons

Replying to anonymous:

Can you fix this defect?

If only it was a small defect/bug... The fact is that Trac 0.12 is not currently supported, as the multi-repos merge made drastic changes to the internal repository and change handling that Bitten uses. Bitten 0.6 does not support Trac 0.12, and currently that work is likely to be targeted for a future 0.7. There are various stray patches like on #342, but currently nothing committed to repository.

comment:10 Changed 15 years ago by mpotter@…

  • Cc mpotter@… added

comment:11 Changed 14 years ago by jonathan@…

  • Cc jonathan@… added

Changed 14 years ago by Steven R. Loomis <srl@…>

FYI: Almost all of my patches against bitten r881 for trac0.12. (I am using this in production- cue scary music) - works around missing authz and fixes an earlier issue with timeline. Doesn't support multi-repos at all, other tickets for that.

comment:12 Changed 14 years ago by Steven R. Loomis <srl@…>

  • Cc srl@… added

My patch is against bitten trunk, forgot to mention that.

comment:13 Changed 14 years ago by osimons

This latest patch on this ticket is identical to the patch cooking over at #480. Some issues with it are already reported there but not yet fixed - particularly for proper configuration on fresh 0.12 projects.

I propose we keep #480 as the ticket for doing 0.6-targeted Trac 0.12 support, which in reality means only "default repository" as defined in config using 0.11-style repository configuration.

This ticket should target the longer-term support for actually fully supporting the new multi-repository model in Trac 0.12 that may ckeckout, build and report across multiple repository backends and paths configured in a single Trac project. The mentioned 342 contains some patches towards this end.

comment:14 Changed 13 years ago by Myroslav Opyr <myroslav@…>

  • Cc myroslav@… added

FYI, there's multipath patch "in-the-wild" attached to #244. Maybe multipath code can be starting point for multi-repos support?

comment:15 Changed 11 years ago by osimons

  • Resolution set to fixed
  • Status changed from new to closed

Following [1016] I think this ticket should be closed. We keep #342 for tracking the problem of dvcs branches, but otherwise the main multi-repository support for Trac 0.12+ should be concluded now that #765 is fixed.

comment:16 Changed 11 years ago by osimons

  • Owner set to osimons

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.