Opened 10 years ago

Last modified 10 years ago

user story #81 (new)

I got a attribut error

Test Complete Size: undefined Test Complete Date:
Documentation Complete Size: undefined Documentation Complete Date:
Acceptance Complete Size: undefined Acceptance Complete Date:
Reported by: jonwinandy Owned by: ja11sop
Milestone: Undecided Component: agile-trac.org
Version: Keywords:
Cc: Blocked By:
Blocking: Patch SVN Revision:
Patch Trac Version:
In Iterations: None

Description

I just installed the agileplugin as described, but when i work on tickets :

Oops…
Trac detected an internal error:

AttributeError: 'TicketSystem' object has no attribute 'get_ticket_completion_stages'

If you think this should work you can reproduce the problem, you should consider reporting this to the Trac team.

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, please try the mailing list instead of filing a ticket.

Otherwise, please ==== How to Reproduce ==== While doing a GET operation on `/ticket/3`, Trac issued an internal error. ''(please provide additional details here)'' Request parameters: {{{ {'id': u'3'} }}} User Agent was: `Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.6) Gecko/2009011912 Firefox/3.0.6 GTB5 Ubiquity/0.1.5` ==== System Information ==== || '''Trac''' || `0.11` || || '''Python''' || `2.5.2 (r252:60911, Oct 5 2008, 19:42:18) ` [[br]] `[GCC 4.3.2]` || || '''setuptools''' || `0.6c9` || || '''SQLite''' || `3.5.9` || || '''pysqlite''' || `2.4.1` || || '''Genshi''' || `0.5` || || '''mod_python''' || `3.3.1` || || '''Pygments''' || `0.10` || || '''Subversion''' || `1.5.1 (r32289)` || || '''jQuery:''' || `1.2.3` || ==== Python Traceback ==== {{{ Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 423, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 197, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.5/site-packages/trac/ticket/web_ui.py", line 152, in process_request return self._process_ticket_request(req) File "/usr/lib/python2.5/site-packages/trac/ticket/web_ui.py", line 494, in _process_ticket_request get_reporter_id(req, 'author'), field_changes) File "/usr/lib/python2.5/site-packages/trac/ticket/web_ui.py", line 1184, in _insert_ticket_data req, ticket, action) File "build/bdist.linux-i686/egg/agiletrac/workflow.py", line 394, in render_ticket_action_control stages = TicketSystem(self.env).get_ticket_completion_stages(ticket) AttributeError: 'TicketSystem' object has no attribute 'get_ticket_completion_stages' }}} a new ticket at the Trac project site, where you can describe the problem and explain how to reproduce it.
Python Traceback
Most recent call last:

    * File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 423, in _dispatch_request
      Code fragment:
       418. try:
       419. if not env and env_error:
       420. raise HTTPInternalError(env_error)
       421. try:
       422. dispatcher = RequestDispatcher(env)
       423. dispatcher.dispatch(req)
       424. except RequestDone:
       425. pass
       426. resp = req._response or []
       427.  
       428. 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 0xb8c98cec>
      e 	AttributeError("'TicketSystem' object has no attribute ...
      env 	<trac.env.Environment object at 0xb8b0bb8c>
      env_error 	None
      exc_info 	(<type 'exceptions.AttributeError'>, AttributeError("'TicketSystem' object ...
      filename 	'/usr/lib/python2.5/site-packages/trac/web/main.py'
      frames 	[{'function': '_dispatch_request', 'lines_before': [u' try:', u' ...
      has_admin 	True
      line 	u' dispatcher.dispatch(req)'
      lineno 	422
      message 	u"AttributeError: 'TicketSystem' object has no attribute ...
      req 	<Request "GET u'/ticket/3'">
      resp 	[]
      tb 	<traceback object at 0xb8ed8dc4>
      tb_hide 	None
      traceback 	'Traceback (most recent call last):\n File ...
    * File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 197, in dispatch
      Code fragment:
       192. req.args.get('__FORM_TOKEN') != req.form_token:
       193. raise HTTPBadRequest('Missing or invalid form token. '
       194. 'Do you have cookies enabled?')
       195.  
       196. # Process the request and render the template
       197. resp = chosen_handler.process_request(req)
       198. if resp:
       199. if len(resp) == 2: # Clearsilver
       200. chrome.populate_hdf(req)
       201. template, content_type = \
       202. self._post_process_request(req, *resp)
      Local variables:
      Name	Value
      chosen_handler 	<trac.ticket.web_ui.TicketModule object at 0xb8cac72c>
      chrome 	<trac.web.chrome.Chrome object at 0xb8cac08c>
      err 	(<type 'exceptions.AttributeError'>, AttributeError("'TicketSystem' object ...
      handler 	<trac.ticket.web_ui.TicketModule object at 0xb8cac72c>
      req 	<Request "GET u'/ticket/3'">
      self 	<trac.web.main.RequestDispatcher object at 0xb8c98cec>
    * File "/usr/lib/python2.5/site-packages/trac/ticket/web_ui.py", line 152, in process_request
      Code fragment:
       147.  
       148. def process_request(self, req):
       149. if 'id' in req.args:
       150. if req.path_info.startswith('/newticket'):
       151. raise TracError(_("id can't be set for a new ticket request."))
       152. return self._process_ticket_request(req)
       153. return self._process_newticket_request(req)
       154.  
       155. # ITemplateProvider methods
       156.  
       157. def get_htdocs_dirs(self):
      Local variables:
      Name	Value
      req 	<Request "GET u'/ticket/3'">
      self 	<trac.ticket.web_ui.TicketModule object at 0xb8cac72c>
    * File "/usr/lib/python2.5/site-packages/trac/ticket/web_ui.py", line 494, in _process_ticket_request
      Code fragment:
       489. 'resolve_resolution': None,
       490. # Store a timestamp for detecting "mid air collisions"
       491. 'timestamp': str(ticket.time_changed)})
       492.  
       493. self._insert_ticket_data(req, ticket, data,
       494. get_reporter_id(req, 'author'), field_changes)
       495.  
       496. mime = Mimeview(self.env)
       497. format = req.args.get('format')
       498. if format:
       499. # FIXME: mime.send_converted(context, ticket, 'ticket_x')
      Local variables:
      Name	Value
      action 	'view'
      data 	{'comment': None, 'description_change': None, 'replyto': None, ...
      field_changes 	None
      id 	3
      req 	<Request "GET u'/ticket/3'">
      self 	<trac.ticket.web_ui.TicketModule object at 0xb8cac72c>
      ticket 	<trac.ticket.model.Ticket object at 0xb8dd876c>
      version 	None
    * File "/usr/lib/python2.5/site-packages/trac/ticket/web_ui.py", line 1184, in _insert_ticket_data
      Code fragment:
      1179. hints = []
      1180. widgets = []
      1181. for controller in self._get_action_controllers(req, ticket,
      1182. action):
      1183. label, widget, hint = controller.render_ticket_action_control(
      1184. req, ticket, action)
      1185. if not first_label:
      1186. first_label = label
      1187. widgets.append(widget)
      1188. hints.append(hint)
      1189. action_controls.append((action, first_label, tag(widgets), hints))
      Local variables:
      Name	Value
      action 	'size'
      action_controls 	[('leave', 'leave', <Fragment>, [''])]
      author_id 	'Jon'
      changes 	[]
      cnum 	0
      controller 	<agiletrac.workflow.AgileTicketWorkflow object at 0xb8c98b4c>
      data 	{'comment': None, 'description_change': None, 'replyto': None, ...
      field_changes 	None
      fields 	[{'name': 'summary', 'skip': True, 'label': 'Summary', 'optional': False, ...
      first_label 	None
      hint 	''
      hints 	[]
      label 	'leave'
      quote_original 	<function quote_original at 0xb8e9564c>
      replies 	{}
      replyto 	None
      req 	<Request "GET u'/ticket/3'">
      selected_action 	None
      self 	<trac.ticket.web_ui.TicketModule object at 0xb8cac72c>
      skip 	False
      sorted_actions 	['leave', 'size', 'resolve', 'reassign']
      ticket 	<trac.ticket.model.Ticket object at 0xb8dd876c>
      values 	{}
      widget 	<Fragment>
      widgets 	[]
    * File "build/bdist.linux-i686/egg/agiletrac/workflow.py", line 394, in render_ticket_action_control
      Local variables:
      Name	Value
      action 	'size'
      control 	[]
      hints 	[]
      model 	<module 'trac.ticket.model' from ...
      operations 	[u'set_size']
      req 	<Request "GET u'/ticket/3'">
      self 	<agiletrac.workflow.AgileTicketWorkflow object at 0xb8c98b4c>
      status 	u''
      this_action 	{'operations': [u'set_size'], 'name': 'size', 'default': 0, 'newstate': ...
      ticket 	<trac.ticket.model.Ticket object at 0xb8dd876c>

File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 423, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 197, in dispatch
  resp = chosen_handler.process_request(req)
File "/usr/lib/python2.5/site-packages/trac/ticket/web_ui.py", line 152, in process_request
  return self._process_ticket_request(req)
File "/usr/lib/python2.5/site-packages/trac/ticket/web_ui.py", line 494, in _process_ticket_request
  get_reporter_id(req, 'author'), field_changes)
File "/usr/lib/python2.5/site-packages/trac/ticket/web_ui.py", line 1184, in _insert_ticket_data
  req, ticket, action)
File "build/bdist.linux-i686/egg/agiletrac/workflow.py", line 394, in render_ticket_action_control

System Information:

User Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.6) Gecko/2009011912 Firefox/3.0.6 GTB5 Ubiquity/0.1.5
Trac: 	0.11
Python: 	2.5.2 (r252:60911, Oct 5 2008, 19:42:18) [GCC 4.3.2]
setuptools: 	0.6c9
SQLite: 	3.5.9
pysqlite: 	2.4.1
Genshi: 	0.5
mod_python: 	3.3.1
Pygments: 	0.10
Subversion: 	1.5.1 (r32289)
jQuery:	1.2.3

Is there a quick solution ?

Attachments

Picture 12.png Download (38.6 KB) - added by jonwinandy 10 years ago.
New ticket screen shot

Change History

Have a look at the list of modified files related to this ticket.

Changed 10 years ago by jonwinandy

New ticket screen shot

Changed 10 years ago by jonwinandy

There is no custom fields. Strange ?

Changed 10 years ago by ja11sop

Ok as a sanity check did you remember to upgrade your trac installation? For example,

trac-admin /path/to/trac/project upgrade

Also if you had tickets present before you installed agile-trac then it will not work for those tickets. See ticket:44 which I'm trying to develop a strategy for addressing very soon.

Changed 10 years ago by jonwinandy

It was done. The problem is with new tickets too (only 2, the trac is new).

The main issue I see is about custom fields, for example on this website, but not on my side. Is there a couple of checks I can do ?

Changed 10 years ago by ja11sop

Reading this again I think the issue is that you have not patched your trac installation. Please check you have followed the steps outlined in Step 2 of the installation instructions: Install the Patch.

Note: See TracTickets for help on using tickets.