Oops… Trac detected an internal error: KeyError: u'force_status' 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/1636`, Trac issued an internal error. ''(please provide additional details here)'' Request parameters: {{{ {'__EDITOR__1': u'wysiwyg', '__EDITOR__2': u'wysiwyg', '__FORM_TOKEN': u'ae2d6d650be44f53c3f1d9e3', 'action': u'force_status', 'cnum': u'25', 'comment': u'', 'field_actual_hours': u'142.25', 'field_blockedby': u'', 'field_blocking': u'', 'field_cc': u'', 'field_component': u'Trac', 'field_description': u'Please do not modify this issue for any reason.\xa0 It is being used to test status transition validation and status transition reporting.\xa0 If the state is changed (moved to a new status), that testing may be compromised.', 'field_estimated_hours': u'142.5', 'field_keywords': u'', 'field_phase_found_in': u'Development', 'field_priority': u'Medium', 'field_qc_status': u'None', 'field_qc_subject': u'', 'field_qc_type': u'None', 'field_reporter': u'kenl', 'field_severity': u'Hindrance', 'field_sub_component': u'None', 'field_summary': u'Test Issue - Summary', 'field_target_release': u'2.0', 'field_type': u'defect', 'field_version': u'1.5', 'force_status_value': u'wait_testing', 'id': u'1636', 'replyto': u'', 'submit': u'Submit changes', 'ts': u'2009-04-16 17:41:39+00:00'} }}} User Agent was: `Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8` ==== System Information ==== || '''Trac''' || `0.11.1` || || '''Python''' || `2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]` || || '''setuptools''' || `0.6c9` || || '''psycopg2''' || `2.0.6` || || '''Genshi''' || `0.5.1` || || '''mod_python''' || `3.3.1` || || '''Pygments''' || `0.9` || || '''Subversion''' || `1.5.3 (r33570)` || || '''jQuery:''' || `1.2.6` || ==== Python Traceback ==== {{{ Traceback (most recent call last): File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\web\main.py", line 423, in _dispatch_request dispatcher.dispatch(req) File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\web\main.py", line 197, in dispatch resp = chosen_handler.process_request(req) File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\ticket\web_ui.py", line 170, in process_request return self._process_ticket_request(req) File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\ticket\web_ui.py", line 490, in _process_ticket_request valid = self._validate_ticket(req, ticket) and not problems File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\ticket\web_ui.py", line 945, in _validate_ticket for field, message in manipulator.validate_ticket(req, ticket): File "c:\python25\lib\site-packages\ticketvalidator-0.1-py2.5.egg\ticketvalidator\core.py", line 53, in validate_ticket state = self._get_state(req, ticket) File "c:\python25\lib\site-packages\ticketvalidator-0.1-py2.5.egg\ticketvalidator\core.py", line 74, in _get_state action_changes.update(controller.get_ticket_changes(req, ticket, action)) File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\ticket\default_workflow.py", line 293, in get_ticket_changes this_action = self.actions[action] KeyError: u'force_status' }}} 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 "c:\Python25\lib\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 e KeyError(u'force_status',) env env_error None exc_info (, KeyError(u'force_status',), resp [] tb tb_hide None traceback 'Traceback (most recent call last):\n File ... * File "c:\Python25\lib\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 chrome ctype 'application/x-www-form-urlencoded' e TypeError("'NoneType' object is unsubscriptable",) err (, KeyError(u'force_status',), options {} req self * File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\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 self * File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\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'force_status' actions ['leave', 'reverttesttoreadytest', 'rejecttesttoreadydev', ... data {'comment': None, 'preserve_newlines': True, 'ticket': ... field_changes {'status': {'new': u'wait_testing', 'old': u'in_testing', 'by': ... id 1636 problems [] req self ticket version None * File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\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': 'sub_component', 'value': u'None', 'label': ... manipulator name 'sub_component' replyto u'' req resource self ticket valid True * File "c:\python25\lib\site-packages\ticketvalidator-0.1-py2.5.egg\ticketvalidator\core.py", line 53, in validate_ticket Code fragment: 48. 49. def validate_ticket(self, req, ticket): 50. """Make sure required fields for the next state have been 51. the ticket will be in have been entered.""" 52. 53. state = self._get_state(req, ticket) 54. 55. required_fields = self.config.getlist('ticketvalidator', 56. state + '.required') 57. 58. errors = [(field_name, '%s is required' % field_name) Local variables: Name Value req self ticket * File "c:\python25\lib\site-packages\ticketvalidator-0.1-py2.5.egg\ticketvalidator\core.py", line 74, in _get_state Code fragment: 69. 70. action = req.args['action'] 71. action_changes = {} 72. 73. for controller in self._get_action_controllers(req, ticket, action): 74. action_changes.update(controller.get_ticket_changes(req, ticket, action)) 75. 76. return 'status' in action_changes and action_changes['status'] or ticket['status'] 77. 78. def _get_action_controllers(self, req, ticket, action): 79. Local variables: Name Value action u'force_status' action_changes {} controller self ticket * File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\ticket\default_workflow.py", line 293, in get_ticket_changes Code fragment: 288. if status != '*': 289. hints.append(_("Next status will be '%s'") % status) 290. return (this_action['name'], tag(*control), '. '.join(hints)) 291. 292. def get_ticket_changes(self, req, ticket, action): 293. this_action = self.actions[action] 294. 295. # Enforce permissions 296. if not self._has_perms_for_action(req, this_action, ticket.resource): 297. # The user does not have any of the listed permissions, so we won't 298. # do anything. Local variables: Name Value action u'force_status' req self File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\web\main.py", line 423, in _dispatch_request dispatcher.dispatch(req) File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\web\main.py", line 197, in dispatch resp = chosen_handler.process_request(req) File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\ticket\web_ui.py", line 170, in process_request return self._process_ticket_request(req) File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\ticket\web_ui.py", line 490, in _process_ticket_request valid = self._validate_ticket(req, ticket) and not problems File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\ticket\web_ui.py", line 945, in _validate_ticket for field, message in manipulator.validate_ticket(req, ticket): File "c:\python25\lib\site-packages\ticketvalidator-0.1-py2.5.egg\ticketvalidator\core.py", line 53, in validate_ticket state = self._get_state(req, ticket) File "c:\python25\lib\site-packages\ticketvalidator-0.1-py2.5.egg\ticketvalidator\core.py", line 74, in _get_state action_changes.update(controller.get_ticket_changes(req, ticket, action)) File "c:\Python25\lib\site-packages\trac-0.11.1-py2.5.egg\trac\ticket\default_workflow.py", line 293, in get_ticket_changes this_action = self.actions[action] System Information: User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 Trac: 0.11.1 Python: 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] setuptools: 0.6c9 psycopg2: 2.0.6 Genshi: 0.5.1 mod_python: 3.3.1 Pygments: 0.9 Subversion: 1.5.3 (r33570) jQuery: 1.2.6