Opened 10 years ago

Last modified 9 years ago

defect #54 (closed: DONE)

When updating ticket size I received this error

Test Complete Size: 1 Test Complete Date: 09/29/2008
Documentation Complete Size: 0 Documentation Complete Date:
Acceptance Complete Size: 1 Acceptance Complete Date: 09/29/2008
Reported by: ja11sop Owned by: ja11sop
Milestone: Clean up of Plugin with Patch Component: workflow
Version: Keywords:
Cc: Blocked By:
Blocking: Patch SVN Revision:
Patch Trac Version: not_applicable
In Iterations: 15

Description

Oops…

Trac detected an internal error:

NameError?: global name 'updated' is not defined

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 POST operation on /ticket/22, Trac issued an internal error. (please provide additional details here) Request parameters:

{
    '__FORM_TOKEN': u'c789047ad0b80cc4df1ed32a', 
    'action': u'size', 
    'cnum': u'1', 
    'comment': u'', 
    'field_blockedby': u'', 
    'field_blocking': u'', 
    'field_cc': u'', 
    'field_component': u'mdse', 
    'field_description': u'', 
    'field_keywords': u'', 
    'field_milestone': u'Drop 4', 
    'field_priority': u'major', 
    'field_reporter': u'jamiea', 
    'field_summary': u'OpsUser can issue a [UserCommandGenerateClosingQuotes @genClosingQuotes] MddCommand',
    'field_type': u'user story', 
    'field_version': u'', 
    'id': u'22', 
    'replyto': u'', 
    'size_acceptance_complete_size': u'0',
    'size_doc_complete_size': u'0', 
    'size_test_complete_size': u'3',
    'submit': u'Submit changes',
    'ts': u'2008-09-26 15:32:30+00:00'
}

User Agent was: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3pre) Gecko/2008090713 Firefox/3.0.3pre (Swiftfox)

System Information

Trac 0.11.1
Python 2.5.2 (r252:60911, Aug 8 2008, 09:38:22)
[GCC 4.3.1]
setuptools 0.6c9
SQLite 3.5.9
pysqlite 2.3.2
Genshi 0.5.1
mod_python 3.3.1
Pygments 0.10
Subversion 1.5.1 (r32289)
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):

  • File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request dispatcher.dispatch(req)
  • File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 197, in dispatch resp = chosen_handler.process_request(req)
  • File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/web_ui.py", line 173, in process_request return self._process_ticket_request(req)
  • File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/web_ui.py", line 477, in _process_ticket_request action)
  • File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/web_ui.py", line 1029, in get_ticket_changes selected_action)
  • File "build/bdist.linux-i686/egg/agiletrac/workflow.py", line 562, in get_ticket_changes updatedstatus? = determine_new_ticket_status(req, ticket, action)
  • File "build/bdist.linux-i686/egg/agiletrac/workflow.py", line 105, in determine_new_ticket_status updated[name] = new_size NameError?: global name 'updated' is not defined }}} 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-0.11.1-py2.5.egg/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 0x8c51bac>
      e 	NameError("global name 'updated' is not defined",)
      env 	<trac.env.Environment object at 0x872e74c>
      env_error 	None
      exc_info 	(<type 'exceptions.NameError'>, NameError("global name 'updated' is not ...
      filename 	'/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/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"NameError: global name 'updated' is not defined"
      req 	<Request "POST u'/ticket/22'">
      resp 	[]
      tb 	<traceback object at 0x9251194>
      tb_hide 	None
      traceback 	'Traceback (most recent call last):\n File ...
  • File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/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 0x8c51d8c>
          chrome 	<trac.web.chrome.Chrome object at 0x8ca176c>
          ctype 	'application/x-www-form-urlencoded'
          e 	TypeError("'NoneType' object is unsubscriptable",)
          err 	(<type 'exceptions.NameError'>, NameError("global name 'updated' is not ...
          handler 	<trac.ticket.web_ui.TicketModule object at 0x8c51d8c>
          options 	{}
          req 	<Request "POST u'/ticket/22'">
          self 	<trac.web.main.RequestDispatcher object at 0x8c51bac>
    
  • File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/web_ui.py", line 173, in process_request Code fragment:
    1. def process_request(self, req):
    2. if 'id' in req.args:
    3. if req.path_info.startswith('/newticket'):
    4. raise TracError?(_("id can't be set for a new ticket request."))
    5. return self._process_ticket_request(req)
    6. return self._process_newticket_request(req)
    7. # ITemplateProvider methods
    8. def get_htdocs_dirs(self):

}}}

Local variables:

      Name	Value
      req 	<Request "POST u'/ticket/22'">
      self 	<trac.ticket.web_ui.TicketModule object at 0x8c51d8c>
  • File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/web_ui.py", line 477, in _process_ticket_request Code fragment:
           472. # the webpage includes both changes by the user and changes by the
           473. # workflow... so we aren't able to differentiate them clearly.
           474.  
           475. self._populate(req, ticket) # Apply changes made by the user
           476. field_changes, problems = self.get_ticket_changes(req, ticket,
           477. action)
           478. if problems:
           479. for problem in problems:
           480. add_warning(req, problem)
           481. add_warning(req,
           482. tag(tag.p('Please review your configuration, '
    
    Local variables:
          Name	Value
          action 	u'size'
          actions 	['leave', 'size', 'resolve', 'reassign']
          data 	{'comment': None, 'preserve_newlines': True, 'ticket': ...
          id 	22
          req 	<Request "POST u'/ticket/22'">
          self 	<trac.ticket.web_ui.TicketModule object at 0x8c51d8c>
          ticket 	<trac.ticket.model.Ticket object at 0x90a70cc>
          version 	None
    
  • File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/web_ui.py", line 1029, in get_ticket_changes Code fragment:
          1024. problems = []
          1025. for controller in self._get_action_controllers(req, ticket,
          1026. selected_action):
          1027. cname = controller.__class__.__name__
          1028. action_changes = controller.get_ticket_changes(req, ticket,
          1029. selected_action)
          1030. for key in action_changes.keys():
          1031. old = ticket[key]
          1032. new = action_changes[key]
          1033. # Check for conflicting changes between controllers
          1034. if key in field_changes:
    
    Local variables:
          Name	Value
          cname 	'AgileTicketWorkflow'
          controller 	<agiletrac.workflow.AgileTicketWorkflow object at 0x8ca3c8c>
          field_changes 	{}
          problems 	[]
          req 	<Request "POST u'/ticket/22'">
          selected_action 	u'size'
          self 	<trac.ticket.web_ui.TicketModule object at 0x8c51d8c>
          ticket 	<trac.ticket.model.Ticket object at 0x90a70cc>
    
  • File "build/bdist.linux-i686/egg/agiletrac/workflow.py", line 562, in get_ticket_changes Local variables:
          Name	Value
          action 	u'size'
          operation 	u'set_size'
          req 	<Request "POST u'/ticket/22'">
          self 	<agiletrac.workflow.AgileTicketWorkflow object at 0x8ca3c8c>
          status 	u''
          this_action 	{'operations': [u'set_size'], 'name': 'size', 'default': 0, 'newstate': ...
          ticket 	<trac.ticket.model.Ticket object at 0x90a70cc>
          updated 	{'status': u''}
    
  • File "build/bdist.linux-i686/egg/agiletrac/workflow.py", line 105, in determine_new_ticket_status Local variables:
          Name	Value
          action 	u'size'
          arg_name 	u'size_test_complete_size'
          cf 	{'name': 'blockedby', 'value': u'', 'custom': True, 'label': u'Blocked ...
          field 	{'completion': True, 'name': 'test_complete_size', 'value': u'undefined', ...
          fully_sized 	True
          name 	'test_complete_size'
          new_size 	u'3'
          partially_sized 	False
          req 	<Request "POST u'/ticket/22'">
          size_fields 	[{'completion': True, 'name': 'test_complete_size', 'value': u'undefined', ...
          status 	'new'
          ticket 	<trac.ticket.model.Ticket object at 0x90a70cc>
    

File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request

dispatcher.dispatch(req)

File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 197, in dispatch

resp = chosen_handler.process_request(req)

File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/web_ui.py", line 173, in process_request

return self._process_ticket_request(req)

File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/web_ui.py", line 477, in _process_ticket_request

action)

File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/web_ui.py", line 1029, in get_ticket_changes

selected_action)

File "build/bdist.linux-i686/egg/agiletrac/workflow.py", line 562, in get_ticket_changesFile "build/bdist.linux-i686/egg/agiletrac/workflow.py", line 105, in determine_new_ticket_status

System Information:

User Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3pre) Gecko/2008090713 Firefox/3.0.3pre (Swiftfox) Trac: 0.11.1 Python: 2.5.2 (r252:60911, Aug 8 2008, 09:38:22) [GCC 4.3.1] setuptools: 0.6c9 SQLite: 3.5.9 pysqlite: 2.3.2 Genshi: 0.5.1 mod_python: 3.3.1 Pygments: 0.10 Subversion: 1.5.1 (r32289) jQuery: 1.2.6

TracGuide — The Trac User and Administration Guide

Change History

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

Changed 10 years ago by ja11sop

  • test_complete_size changed from undefined to 1
  • doc_complete_size changed from undefined to 1
  • acceptance_complete_size changed from undefined to 1

Changed 10 years ago by sgissinger

Isn't it a duplicate of #73 or a similar code mismatch ?

I remember the error and it's quite similar on when it happened (sizing a ticket) and the stack trace looks the same but the last line can be different. Sorry i don't want to recode a bug to check that .

Cheers.

Changed 10 years ago by ja11sop

  • doc_complete_size changed from 1 to 0

Changed 10 years ago by ja11sop

  • acceptance_complete_date set to 09/29/08
  • test_complete_date set to 09/29/08

Actually this was closed by r203

Changed 10 years ago by ja11sop

Changed 9 years ago by ja11sop

  • trac_version set to not_applicable
  • milestone changed from Better User Story Support to Clean up of Plugin with Patch
Note: See TracTickets for help on using tickets.