Modify

Opened 16 years ago

Last modified 5 years ago

#4807 new defect

Internal Error on certain actions when TicketValidator is enabled

Reported by: rolland.veres@… Owned by:
Priority: normal Component: TicketValidatorPlugin
Severity: major Keywords:
Cc: Trac Release: 0.11

Description

On evaluation of this PlugIn I encountered a problem on our test-system.

Environment:

System:

  • TRAC 0.11.1
  • Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]

Configuration:

  • TicketValidator-0.1-py2.5.egg
  • ticketvalidator.* = enabled (under [components])
  • No further configuration on TicketValidator
  • In addition I use AdvancedTicketWorkflowPlugin-0.10dev-py2.5.egg

Problem Description:

Performing actions sometimes work and sometimes yield the an error (see bottom). I could trace down the occurance to only happen if my current ticket state offers actions that have both triage and standard actions.

So it does not happen on ticket states that only show one or more standard actions, and it does not happen in ticket states that only show one triage action.

Oops…
Trac detected an internal error:

ValueError: need more than 1 value to unpack
Python Traceback
Most recent call last:

    * File "C:\Python25\lib\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 0x063BBCF0>
      e 	ValueError('need more than 1 value to unpack',)
      env 	<trac.env.Environment object at 0x06956EF0>
      env_error 	None
      exc_info 	(<type 'exceptions.ValueError'>, ValueError('need more than 1 value to ...
      filename 	'C:\\Python25\\lib\\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'ValueError: need more than 1 value to unpack'
      req 	<Request "POST u'/ticket/48'">
      resp 	[]
      tb 	<traceback object at 0x06807990>
      tb_hide 	None
      traceback 	'Traceback (most recent call last):\n File ...
    * File "C:\Python25\lib\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 0x05E2F5D0>
      chrome 	<trac.web.chrome.Chrome object at 0x181043D0>
      ctype 	'application/x-www-form-urlencoded'
      err 	(<type 'exceptions.ValueError'>, ValueError('need more than 1 value to ...
      handler 	<trac.ticket.web_ui.TicketModule object at 0x05E2F5D0>
      options 	{}
      req 	<Request "POST u'/ticket/48'">
      self 	<trac.web.main.RequestDispatcher object at 0x063BBCF0>
    * File "C:\Python25\lib\site-packages\trac\ticket\web_ui.py", line 170, in process_request
      Code fragment:
       165.  
       166. def process_request(self, req):
       167. if 'id' in req.args:
       168. if req.path_info.startswith('/newticket'):
       169. raise TracError(_("id can't be set for a new ticket request."))
       170. return self._process_ticket_request(req)
       171. return self._process_newticket_request(req)
       172.  
       173. # ITemplateProvider methods
       174.  
       175. def get_htdocs_dirs(self):
      Local variables:
      Name	Value
      req 	<Request "POST u'/ticket/48'">
      self 	<trac.ticket.web_ui.TicketModule object at 0x05E2F5D0>
    * File "C:\Python25\lib\site-packages\trac\ticket\web_ui.py", line 490, in _process_ticket_request
      Code fragment:
       485. self._apply_ticket_changes(ticket, field_changes) # Apply changes made by the workflow
       486. # Unconditionally run the validation so that the user gets
       487. # information any and all problems. But it's only valid if it
       488. # validates and there were no problems with the workflow side of
       489. # things.
       490. valid = self._validate_ticket(req, ticket) and not problems
       491. if 'preview' not in req.args:
       492. if valid:
       493. # redirected if successful
       494. self._do_save(req, ticket, action)
       495. # else fall through in a preview
      Local variables:
      Name	Value
      action 	u'reinvestigate'
      actions 	['reassign', 'reinvestigate', 'triage deciding', 'close']
      data 	{'comment': None, 'preserve_newlines': True, 'ticket': ...
      field_changes 	{'status': {'new': u'Analysing', 'old': u'Deciding', 'by': ...
      id 	48
      problems 	[]
      req 	<Request "POST u'/ticket/48'">
      self 	<trac.ticket.web_ui.TicketModule object at 0x05E2F5D0>
      ticket 	<trac.ticket.model.Ticket object at 0x06895630>
      version 	None
    * File "C:\Python25\lib\site-packages\trac\ticket\web_ui.py", line 945, in _validate_ticket
      Code fragment:
       940. # Shouldn't happen in "normal" circumstances, hence not a warning
       941. raise InvalidTicket(_('Invalid comment threading identifier'))
       942.  
       943. # Custom validation rules
       944. for manipulator in self.ticket_manipulators:
       945. for field, message in manipulator.validate_ticket(req, ticket):
       946. valid = False
       947. if field:
       948. add_warning(req, _("The ticket field '%(field)s' is "
       949. "invalid: %(message)s",
       950. field=field, message=message))
      Local variables:
      Name	Value
      comment 	u''
      field 	{'custom': True, 'name': 'responsibility', 'value': u'Unknown', 'label': ...
      manipulator 	<ticketvalidator.core.RequiredFieldValidator object at 0x06261FF0>
      name 	'responsibility'
      replyto 	u''
      req 	<Request "POST u'/ticket/48'">
      resource 	<Resource u'ticket:48'>
      self 	<trac.ticket.web_ui.TicketModule object at 0x05E2F5D0>
      ticket 	<trac.ticket.model.Ticket object at 0x06895630>
      valid 	True
    * File "build\bdist.win32\egg\ticketvalidator\core.py", line 53, in validate_ticket
      Local variables:
      Name	Value
      req 	<Request "POST u'/ticket/48'">
      self 	<ticketvalidator.core.RequiredFieldValidator object at 0x06261FF0>
      ticket 	<trac.ticket.model.Ticket object at 0x06895630>
    * File "build\bdist.win32\egg\ticketvalidator\core.py", line 74, in _get_state
      Local variables:
      Name	Value
      action 	u'reinvestigate'
      action_changes 	{'status': u'Analysing'}
      controller 	<advancedworkflow.controller.TicketWorkflowOpTriage object at 0x062617F0>
      req 	<Request "POST u'/ticket/48'">
      self 	<ticketvalidator.core.RequiredFieldValidator object at 0x06261FF0>
      ticket 	<trac.ticket.model.Ticket object at 0x06895630>
    * File "build\bdist.win32\egg\advancedworkflow\controller.py", line 336, in get_ticket_changes
      Local variables:
      Name	Value
      action 	u'reinvestigate'
      req 	<Request "POST u'/ticket/48'">
      self 	<advancedworkflow.controller.TicketWorkflowOpTriage object at 0x062617F0>
      ticket 	<trac.ticket.model.Ticket object at 0x06895630>
    * File "build\bdist.win32\egg\advancedworkflow\controller.py", line 345, in _new_status 

Attachments (0)

Change History (5)

comment:1 Changed 16 years ago by Max Stewart

Resolution: invalid
Status: newclosed

This is an error with the AdvancedTicketWorkflowPlugin.

Last edited 5 years ago by Ryan J Ollos (previous) (diff)

comment:2 Changed 14 years ago by anonymous

Resolution: invalid
Status: closedreopened

comment:3 Changed 12 years ago by Ryan J Ollos

#7619 closed as a duplicate.

comment:4 Changed 12 years ago by Ryan J Ollos

#7619 notes: For a solution, see ticket #9554.

comment:5 Changed 7 years ago by Ryan J Ollos

Owner: Max Stewart deleted
Status: reopenednew

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


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

 
Note: See TracTickets for help on using tickets.