Oops…

Trac detected an internal error:
KeyError: 'T'

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 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:

    1. try:
    2. if not env and env_error:
    3. raise HTTPInternalError(env_error)
    4. try:
    5. dispatcher = RequestDispatcher(env)
    6. dispatcher.dispatch(req)
    7. except RequestDone:
    8. pass
    9. resp = req._response or []
    10.  
    11. except HTTPException, e:

    Local variables:

    NameValue
    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 0x2bd1510>
    e KeyError('T',)
    env <trac.env.Environment object at 0x2767110>
    env_error None
    exc_info (<type 'exceptions.KeyError'>, KeyError('T',), <traceback object at ...
    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"KeyError: 'T'"
    req <Request "GET u'/report'">
    resp []
    tb <traceback object at 0x2deb5f0>
    tb_hide None
    traceback 'Traceback (most recent call last):\n File ...
  • File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 173, in dispatch

    Code fragment:

    1. if not req.path_info or req.path_info == '/':
    2. chosen_handler = self.default_handler
    3. # pre-process any incoming request, whether a handler
    4. # was found or not
    5. chosen_handler = self._pre_process_request(req,
    6. chosen_handler)
    7. except TracError, e:
    8. raise HTTPInternalError(e)
    9. if not chosen_handler:
    10. raise HTTPNotFound('No handler matched request to %s',
    11. req.path_info)

    Local variables:

    NameValue
    chosen_handler <trac.ticket.report.ReportModule object at 0x2bd1190>
    chrome <trac.web.chrome.Chrome object at 0x2b14d10>
    err (<type 'exceptions.KeyError'>, KeyError('T',), <traceback object at ...
    handler <trac.ticket.report.ReportModule object at 0x2bd1190>
    req <Request "GET u'/report'">
    self <trac.web.main.RequestDispatcher object at 0x2bd1510>
  • File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 286, in _pre_process_request

    Code fragment:

    1. req.outcookie['trac_form_token']['path'] = req.base_path or '/'
    2. return req.outcookie['trac_form_token'].value
    3.  
    4. def _pre_process_request(self, req, chosen_handler):
    5. for filter_ in self.filters:
    6. chosen_handler = filter_.pre_process_request(req, chosen_handler)
    7. return chosen_handler
    8.  
    9. def _post_process_request(self, req, *args):
    10. nbargs = len(args)
    11. resp = args

    Local variables:

    NameValue
    chosen_handler <trac.ticket.report.ReportModule object at 0x2bd1190>
    filter_ <trac.versioncontrol.api.RepositoryManager object at 0x2bd1110>
    req <Request "GET u'/report'">
    self <trac.web.main.RequestDispatcher object at 0x2bd1510>
  • File "/usr/lib/python2.5/site-packages/trac/versioncontrol/api.py", line 86, in pre_process_request

    Code fragment:

    1.  
    2. def pre_process_request(self, req, handler):
    3. from trac.web.chrome import Chrome, add_warning
    4. if handler is not Chrome(self.env):
    5. try:
    6. self.get_repository(req.authname).sync()
    7. except TracError, e:
    8. add_warning(req, _("Can't synchronize with the repository "
    9. "(%(error)s). Look in the Trac log for more "
    10. "information.", error=e.message))

    Local variables:

    NameValue
    Chrome <class 'trac.web.chrome.Chrome'>
    add_warning <function add_warning at 0x272df50>
    handler <trac.ticket.report.ReportModule object at 0x2bd1190>
    req <Request "GET u'/report'">
    self <trac.versioncontrol.api.RepositoryManager object at 0x2bd1110>
  • File "/usr/lib/python2.5/site-packages/trac/versioncontrol/cache.py", line 200, in sync

    Code fragment:

    1. return
    2.  
    3. # 1.2. now *only* one process was able to get there
    4. # (i.e. there *shouldn't* be any race condition here)
    5.  
    6. for path,kind,action,bpath,brev in cset.get_changes():
    7. self.log.debug("Caching node change in [%s]: %s"
    8. % (next_youngest,
    9. (path,kind,action,bpath,brev)))
    10. kind = kindmap[kind]
    11. action = actionmap[action]

    Local variables:

    NameValue
    action 'E'
    actionmap {'edit': 'E', 'add': 'A', 'move': 'M', 'copy': 'C', 'delete': 'D'}
    authz <trac.versioncontrol.api.Authorizer object at 0x2de1990>
    bpath 'unified_python/ubuntu/bin/python'
    brev u'43e32dcda4265a5fa4f99160b6d806bc0646d286'
    cset <tracext.git.git_fs.GitChangeset object at 0x2de7b50>
    cursor <trac.db.util.IterableCursor object at 0x2da76e0>
    db <trac.db.pool.PooledConnection object at 0x2da98c0>
    feedback None
    key 'youngest_rev'
    kind 'F'
    kindmap {'file': 'F', 'dir': 'D'}
    metadata {u'youngest_rev': u'43e32dcda4265a5fa4f99160b6d806bc0646d286', ...
    name u'youngest_rev'
    next_youngest '9c358c0fa656ccde500652118535f85e117c1451'
    path 'unified_python/ubuntu/bin/python'
    repos_youngest 'ff7056f47c92026d8686f889d0452b47706ebf8b'
    repository_dir u'git:/git'
    self <tracext.git.git_fs.CachedRepository2 object at 0x2de19d0>
    value u'43e32dcda4265a5fa4f99160b6d806bc0646d286'
  • File "/usr/lib/python2.5/site-packages/tracext/git/git_fs.py", line 432, in get_changes

    Code fragment:

    1.  
    2. kind = Node.FILE
    3. if mode2.startswith('04') or mode1.startswith('04'):
    4. kind = Node.DIRECTORY
    5.  
    6. action = GitChangeset.action_map[action[0]]
    7.  
    8. if action == Changeset.ADD:
    9. p_path = ''
    10. p_rev = None
    11.  

    Local variables:

    NameValue
    action 'T'
    kind 'file'
    mode1 '100755'
    mode2 '120000'
    obj1 '8ecc845b9cef20cfd19a60c52b3f3f78a4d9b22e'
    obj2 'e936789f738859bf8381f595a84e82712461ff8a'
    p_path 'unified_python/ubuntu/bin/python-config'
    p_rev u'43e32dcda4265a5fa4f99160b6d806bc0646d286'
    parent u'43e32dcda4265a5fa4f99160b6d806bc0646d286'
    path 'unified_python/ubuntu/bin/python-config'
    path1 'unified_python/ubuntu/bin/python-config'
    path2 None
    paths_seen set(['unified_python/ubuntu/bin/2to3', 'unified_python/ubuntu/bin/idle', ...
    self <tracext.git.git_fs.GitChangeset object at 0x2de7b50>
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 173, in dispatch
  chosen_handler)
File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 286, in _pre_process_request
  chosen_handler = filter_.pre_process_request(req, chosen_handler)
File "/usr/lib/python2.5/site-packages/trac/versioncontrol/api.py", line 86, in pre_process_request
  self.get_repository(req.authname).sync()
File "/usr/lib/python2.5/site-packages/trac/versioncontrol/cache.py", line 200, in sync
  for path,kind,action,bpath,brev in cset.get_changes():
File "/usr/lib/python2.5/site-packages/tracext/git/git_fs.py", line 432, in get_changes
  action = GitChangeset.action_map[action[0]]

System Information:

User Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101230 Firefox/3.6.13

Trac: 0.11.1
Python: 2.5.2 (r252:60911, Jan 24 2010, 17:44:40) [GCC 4.3.2]
setuptools: 0.6c11
SQLite: 3.5.9
pysqlite: 2.4.1
Genshi: 0.5.1
Pygments: 0.10
GIT: 1.5.6.5
jQuery:1.2.6

TracGuide — The Trac User and Administration Guide