Oops... Trac detected an internal error: KeyError: 'announcer/locale' This is probably a local installation issue. Found a bug in Trac? If you think this should work and you can reproduce the problem, you should consider creating a bug report. Note that the AnnouncerPlugin plugin seems to be involved. Please report this issue to the plugin maintainer. 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 or its plugins, please try the mailing list instead of creating a ticket. Otherwise, please ==== How to Reproduce ==== While doing a POST operation on `/ticket/57`, Trac issued an internal error. ''(please provide additional details here)'' Request parameters: {{{ {'__FORM_TOKEN': u'381c2c98ea3046c864a19eb4', 'action': u'leave', 'cnum': u'22', 'comment': u'Dies ist ein Kommentar, um zu testen, ob Trac wieder absemmelt', 'field_cc': u'', 'field_component': u'CO - KT', 'field_description': u'Schlie\xdfe dieses Ticket bitte', 'field_keywords': u'', 'field_milestone': u'', 'field_priority': u'blocker', 'field_reporter': u'crunk', 'field_summary': u'TestTicket - Dieses Ticket schlie\xdfen', 'field_type': u'task', 'field_version': u'', 'id': u'57', 'replyto': u'', 'submit': u'Submit changes', 'ts': u'2010-09-10 11:20:33.780427+00:00'} }}} User agent: `Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8` ==== System Information ==== || '''`Trac`''' || `0.12` || || '''`Trac`''' || `0.12` || || '''`Genshi`''' || `0.6` || || '''`pysqlite`''' || `2.4.0` || || '''`Python`''' || `2.5.2 (r252:60911, Jan 20 2010, 21:48:48) ` [[br]] `[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)]` || || '''`Python`''' || `2.5.2 (r252:60911, Jan 20 2010, 21:48:48) ` [[br]] `[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)]` || || '''`RPC`''' || `1.1.0` || || '''`setuptools`''' || `0.6c8` || || '''`setuptools`''' || `0.6c8` || || '''`SQLite`''' || `3.4.2` || || '''`Subversion`''' || `1.4.6 (r28521)` || || '''`jQuery`''' || `1.4.2` || ==== Enabled Plugins ==== || '''`AnnouncerPlugin`''' || `0.12-p2.dev` || || '''`NavAdd`''' || `0.1` || || '''`TicketImport`''' || `0.8` || || '''`TracAccountManager`''' || `0.2.1dev` || || '''`TracXMLRPC`''' || `1.1.0` || ==== Python Traceback ==== {{{ Traceback (most recent call last): File "build/bdist.linux-i686/egg/trac/web/main.py", line 513, in _dispatch_request dispatcher.dispatch(req) File "build/bdist.linux-i686/egg/trac/web/main.py", line 235, in dispatch resp = chosen_handler.process_request(req) File "build/bdist.linux-i686/egg/trac/ticket/web_ui.py", line 169, in process_request return self._process_ticket_request(req) File "build/bdist.linux-i686/egg/trac/ticket/web_ui.py", line 538, in _process_ticket_request self._do_save(req, ticket, action) File "build/bdist.linux-i686/egg/trac/ticket/web_ui.py", line 1233, in _do_save cnum=internal_cnum): File "build/bdist.linux-i686/egg/trac/ticket/model.py", line 353, in save_changes listener.ticket_changed(self, comment, author, old_values) File "build/bdist.linux-i686/egg/announcer/producers/ticket.py", line 92, in ticket_changed announcer = AnnouncementSystem(ticket.env) File "build/bdist.linux-i686/egg/trac/core.py", line 119, in maybe_init init(self) File "build/bdist.linux-i686/egg/announcer/api.py", line 331, in __init__ locale_dir = pkg_resources.resource_filename(__name__, 'locale') File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 841, in resource_filename self, resource_name File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1311, in get_resource_filename return self._extract_resource(manager, zip_path) File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1322, in _extract_resource zip_stat = self.zipinfo[zip_path] KeyError: 'announcer/locale' }}} a new bug report describing the problem and explain how to reproduce it. Python Traceback Most recent call last: * File "build/bdist.linux-i686/egg/trac/web/main.py", line 513, in _dispatch_request Code fragment: Line 508 try: 509 if not env and env_error: 510 raise HTTPInternalError(env_error) 511 try: 512 dispatcher = RequestDispatcher(env) 513 dispatcher.dispatch(req) 514 except RequestDone: 515 pass 516 resp = req._response or [] 517 518 except HTTPException, e: Local variables: Name Value dispatcher e KeyError('announcer/locale',) env env_error None req resp [] * File "build/bdist.linux-i686/egg/trac/web/main.py", line 235, in dispatch Code fragment: Line 230 msg = _('Do you have cookies enabled?') 231 raise HTTPBadRequest(_('Missing or invalid form token.' 232 ' %(msg)s', msg=msg)) 233 234 # Process the request and render the template 235 resp = chosen_handler.process_request(req) 236 if resp: 237 if len(resp) == 2: # Clearsilver 238 chrome.populate_hdf(req) 239 template, content_type = \ 240 self._post_process_request(req, *resp) Local variables: Name Value chosen_handler chrome ctype 'application/x-www-form-urlencoded' err (, KeyError('announcer/locale',), options {} req self * File "build/bdist.linux-i686/egg/trac/ticket/web_ui.py", line 169, in process_request Code fragment: Line 164 165 def process_request(self, req): 166 if 'id' in req.args: 167 if req.path_info == '/newticket': 168 raise TracError(_("id can't be set for a new ticket request.")) 169 return self._process_ticket_request(req) 170 return self._process_newticket_request(req) 171 172 # ITemplateProvider methods 173 174 def get_htdocs_dirs(self): Local variables: Name Value req self * File "build/bdist.linux-i686/egg/trac/ticket/web_ui.py", line 538, in _process_ticket_request Code fragment: Line 533 # things. 534 valid = self._validate_ticket(req, ticket, not valid) and valid 535 if 'preview' not in req.args: 536 if valid: 537 # redirected if successful 538 self._do_save(req, ticket, action) 539 # else fall through in a preview 540 req.args['preview'] = True 541 542 # Preview an existing ticket (after a Preview or a failed Save) 543 data.update({ Local variables: Name Value action u'leave' actions [u'leave', u'resolve', u'reassign', u'accept'] data {'preserve_newlines': True, 'ticket': self ticket valid True version None * File "build/bdist.linux-i686/egg/trac/ticket/web_ui.py", line 1233, in _do_save Code fragment: Line 1228 1229 fragment = '' 1230 now = datetime.now(utc) 1231 if ticket.save_changes(get_reporter_id(req, 'author'), 1232 req.args.get('comment'), when=now, 1233 cnum=internal_cnum): 1234 fragment = cnum and '#comment:' + cnum or '' 1235 try: 1236 tn = TicketNotifyEmail(self.env) 1237 tn.notify(ticket, newticket=False, modtime=now) 1238 except Exception, e: Local variables: Name Value action u'leave' cnum u'22' controllers [ self ticket * File "build/bdist.linux-i686/egg/trac/ticket/model.py", line 353, in save_changes Code fragment: Line 348 old_values = self._old 349 self._old = {} 350 self.values['changetime'] = when 351 352 for listener in TicketSystem(self.env).change_listeners: 353 listener.ticket_changed(self, comment, author, old_values) 354 return True 355 356 def get_changelog(self, when=None, db=None): 357 """Return the changelog as a list of tuples of the form 358 (time, author, field, oldvalue, newvalue, permanent). Local variables: Name Value author u'crunk' cc u'' cclist [u''] cnum u'22' comment u'Dies ist ein Kommentar, um zu testen, ob Trac wieder absemmelt' db None do_save None listener old_values {} self when datetime.datetime(2010, 9, 10, 13, 13, 21, 241311, tzinfo= ticket * File "build/bdist.linux-i686/egg/trac/core.py", line 119, in maybe_init Code fragment: Line 114 def maybe_init(self, compmgr, init=init, cls=new_class): 115 if cls not in compmgr.components: 116 compmgr.components[cls] = self 117 if init: 118 try: 119 init(self) 120 except: 121 del compmgr.components[cls] 122 raise 123 maybe_init._original = init 124 new_class.__init__ = maybe_init Local variables: Name Value cls compmgr init self * File "build/bdist.linux-i686/egg/announcer/api.py", line 331, in __init__ Code fragment: Line 326 ] 327 ] 328 329 def __init__(self): 330 # bind the 'announcer' catalog to the locale directory 331 locale_dir = pkg_resources.resource_filename(__name__, 'locale') 332 add_domain(self.env.path, locale_dir) 333 334 def environment_created(self): 335 self._upgrade_db(self.env.get_db_cnx()) 336 Local variables: Name Value self * File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 841, in resource_filename Code fragment: Line 836 ) 837 838 def resource_filename(self, package_or_requirement, resource_name): 839 """Return a true filesystem path for specified resource""" 840 return get_provider(package_or_requirement).get_resource_filename( 841 self, resource_name 842 ) 843 844 def resource_stream(self, package_or_requirement, resource_name): 845 """Return a readable file-like object for specified resource""" 846 return get_provider(package_or_requirement).get_resource_stream( Local variables: Name Value package_or_requirement 'announcer.api' resource_name 'locale' self * File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1311, in get_resource_filename Code fragment: Line 1306 zip_path = self._resource_to_zip(resource_name) 1307 eagers = self._get_eager_resources() 1308 if '/'.join(self._parts(zip_path)) in eagers: 1309 for name in eagers: 1310 self._extract_resource(manager, self._eager_to_zip(name)) 1311 return self._extract_resource(manager, zip_path) 1312 1313 def _extract_resource(self, manager, zip_path): 1314 1315 if zip_path in self._index(): 1316 for name in self._index()[zip_path]: Local variables: Name Value eagers [] manager resource_name 'locale' self zip_path 'announcer/locale' * File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1322, in _extract_resource Code fragment: Line 1317 last = self._extract_resource( 1318 manager, os.path.join(zip_path, name) 1319 ) 1320 return os.path.dirname(last) # return the extracted directory name 1321 1322 zip_stat = self.zipinfo[zip_path] 1323 t,d,size = zip_stat[5], zip_stat[6], zip_stat[3] 1324 date_time = ( 1325 (d>>9)+1980, (d>>5)&0xF, d&0x1F, # ymd 1326 (t&0xFFFF)>>11, (t>>5)&0x3F, (t&0x1F) * 2, 0, 0, -1 # hms, etc. 1327 ) Local variables: Name Value manager self zip_path 'announcer/locale' File "build/bdist.linux-i686/egg/trac/web/main.py", line 513, in _dispatch_request dispatcher.dispatch(req) File "build/bdist.linux-i686/egg/trac/web/main.py", line 235, in dispatch resp = chosen_handler.process_request(req) File "build/bdist.linux-i686/egg/trac/ticket/web_ui.py", line 169, in process_request return self._process_ticket_request(req) File "build/bdist.linux-i686/egg/trac/ticket/web_ui.py", line 538, in _process_ticket_request self._do_save(req, ticket, action) File "build/bdist.linux-i686/egg/trac/ticket/web_ui.py", line 1233, in _do_save cnum=internal_cnum): File "build/bdist.linux-i686/egg/trac/ticket/model.py", line 353, in save_changes listener.ticket_changed(self, comment, author, old_values) File "build/bdist.linux-i686/egg/announcer/producers/ticket.py", line 92, in ticket_changed announcer = AnnouncementSystem(ticket.env) File "build/bdist.linux-i686/egg/trac/core.py", line 119, in maybe_init init(self) File "build/bdist.linux-i686/egg/announcer/api.py", line 331, in __init__ locale_dir = pkg_resources.resource_filename(__name__, 'locale') File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 841, in resource_filename self, resource_name File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1311, in get_resource_filename return self._extract_resource(manager, zip_path) File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1322, in _extract_resource zip_stat = self.zipinfo[zip_path] System Information: User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 Trac 0.12 Trac 0.12 Genshi 0.6 pysqlite 2.4.0 Python 2.5.2 (r252:60911, Jan 20 2010, 21:48:48) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] Python 2.5.2 (r252:60911, Jan 20 2010, 21:48:48) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] RPC 1.1.0 setuptools 0.6c8 setuptools 0.6c8 SQLite 3.4.2 Subversion 1.4.6 (r28521) jQuery 1.4.2 Enabled Plugins: AnnouncerPlugin 0.12-p2.dev /usr/lib/python2.5/site-packages/AnnouncerPlugin-0.12_p2.dev-py2.5.egg NavAdd 0.1 /usr/lib/python2.5/site-packages/NavAdd-0.1-py2.5.egg TracAccountManager 0.2.1dev /usr/lib/python2.5/site-packages/TracAccountManager-0.2.1dev-py2.5.egg TracXMLRPC 1.1.0 /srv/trac/projects/doricon/plugins/TracXMLRPC-1.1.0-py2.5.egg