Modify

Opened 5 years ago

Closed 5 years ago

#5581 closed defect (worksforme)

KeyError: 'import'

Reported by: grimsy Owned by: rjollos
Priority: normal Component: RepoSearchPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Trac 0.11.5rc2

Postgres 8.3.7

Linux gt-trac-01 2.6.27-14-server #1 SMP Wed Apr 15 19:44:38 UTC 2009 i686 GNU/Linux

Python Traceback
Most recent call last:

    * File "/usr/lib/python2.5/site-packages/Trac-0.11.5rc2-py2.5.egg/trac/web/main.py", line 444, in _dispatch_request
      Code fragment:
       439. try:
       440. if not env and env_error:
       441. raise HTTPInternalError(env_error)
       442. try:
       443. dispatcher = RequestDispatcher(env)
       444. dispatcher.dispatch(req)
       445. except RequestDone:
       446. pass
       447. resp = req._response or []
       448.  
       449. 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 0xbab7b7ac>
      e 	KeyError('import',)
      env 	<trac.env.Environment object at 0xba5506cc>
      env_error 	None
      exc_info 	(<type 'exceptions.KeyError'>, KeyError('import',), <traceback object at ...
      filename 	'/usr/lib/python2.5/site-packages/Trac-0.11.5rc2-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 	443
      message 	u"KeyError: 'import'"
      req 	<Request "GET u'/search'">
      resp 	[]
      tb 	<traceback object at 0xbb43acfc>
      tb_hide 	None
      traceback 	u'Traceback (most recent call last):\n File ...
    * File "/usr/lib/python2.5/site-packages/Trac-0.11.5rc2-py2.5.egg/trac/web/main.py", line 205, in dispatch
      Code fragment:
       200. req.args.get('__FORM_TOKEN') != req.form_token:
       201. raise HTTPBadRequest('Missing or invalid form token. '
       202. 'Do you have cookies enabled?')
       203.  
       204. # Process the request and render the template
       205. resp = chosen_handler.process_request(req)
       206. if resp:
       207. if len(resp) == 2: # Clearsilver
       208. chrome.populate_hdf(req)
       209. template, content_type = \
       210. self._post_process_request(req, *resp)
      Local variables:
      Name	Value
      chosen_handler 	<trac.search.web_ui.SearchModule object at 0xbab7b9ac>
      chrome 	<trac.web.chrome.Chrome object at 0xbaa91ecc>
      err 	(<type 'exceptions.KeyError'>, KeyError('import',), <traceback object at ...
      handler 	<trac.search.web_ui.SearchModule object at 0xbab7b9ac>
      req 	<Request "GET u'/search'">
      self 	<trac.web.main.RequestDispatcher object at 0xbab7b7ac>
    * File "/usr/lib/python2.5/site-packages/Trac-0.11.5rc2-py2.5.egg/trac/search/web_ui.py", line 107, in process_request
      Code fragment:
       102. 'least %(num)s characters long.',
       103. num=self.min_query_length), _('Search Error'))
       104.  
       105. results = []
       106. for source in self.search_sources:
       107. results += list(source.get_search_results(req, terms, filters))
       108. results.sort(lambda x,y: cmp(y[2], x[2]))
       109.  
       110. page = int(req.args.get('page', '1'))
       111. results = Paginator(results, page - 1, self.RESULTS_PER_PAGE)
       112. for idx, result in enumerate(results):
      Local variables:
      Name	Value
      available_filters 	[('repo', 'Source Repository', 0), ('blog', 'Blog'), ('ticket', ...
      data 	{'quickjump': None, 'query': u'test', 'results': [], 'filters': ...
      f 	('changeset', 'Changesets')
      filters 	['repo']
      query 	u'test'
      req 	<Request "GET u'/search'">
      results 	[]
      self 	<trac.search.web_ui.SearchModule object at 0xbab7b9ac>
      source 	<tracreposearch.search.TracRepoSearchPlugin object at 0xbab841cc>
      terms 	[u'test']
    * File "build/bdist.linux-i686/egg/tracreposearch/search.py", line 80, in get_search_results
      Local variables:
      Name	Value
      Indexer 	<class tracreposearch.indexer.Indexer at 0xbb4e1a7c>
      db 	<trac.db.pool.PooledConnection object at 0xbae3b374>
      excludes 	[]
      filters 	['repo']
      include 	[u'*.xml', u'*.txt', u'*.java', u'*.properties', u'*.process', u'*.pkb', ...
      q 	u'test'
      query 	[u'test']
      repo 	<trac.versioncontrol.cache.CachedRepository object at 0xbb0dcd6c>
      req 	<Request "GET u'/search'">
      self 	<tracreposearch.search.TracRepoSearchPlugin object at 0xbab841cc>
      to_unicode 	<bound method Mimeview.to_unicode of <trac.mimeview.api.Mimeview object at ...
    * File "build/bdist.linux-i686/egg/tracreposearch/indexer.py", line 97, in wrap
      Local variables:
      Name	Value
      args 	(<tracreposearch.indexer.Indexer instance at 0xbb47e9cc>,)
      f 	<function reindex at 0xbb43f3ac>
      kw 	{}
    * File "build/bdist.linux-i686/egg/tracreposearch/indexer.py", line 247, in reindex
      Local variables:
      Name	Value
      new_files 	set([u'marvin/trunk/calcJava/trunk/src/main/java/com/glintech/marvin/calcul ...
      node 	<trac.versioncontrol.svn_fs.SubversionNode object at 0xbb13edcc>
      self 	<tracreposearch.indexer.Indexer instance at 0xbb47e9cc>
      start 	1248837643.799161
    * File "build/bdist.linux-i686/egg/tracreposearch/indexer.py", line 229, in _invalidate_file
      Local variables:
      Name	Value
      file 	u'marvin/trunk/adapterFileBw/trunk/build.xml'
      self 	<tracreposearch.indexer.Indexer instance at 0xbb47e9cc>
      word 	u'import'
      word_files 	set([u'marvin/trunk/adapterFileBw/trunk/Test/Unit/SAN/File ...
    * File "build/bdist.linux-i686/egg/tracreposearch/indexer.py", line 42, in __getitem__
      Local variables:
      Name	Value
      key 	'import'
      self 	<tracreposearch.indexer.psetdict object at 0xbb46832c>
    * File "/usr/lib/python2.5/bsddb/__init__.py", line 223, in __getitem__
      Code fragment:
       218. self._checkOpen()
       219. return _DeadlockWrap(lambda: len(self.db)) # len(self.db)
       220.  
       221. def __getitem__(self, key):
       222. self._checkOpen()
       223. return _DeadlockWrap(lambda: self.db[key]) # self.db[key]
       224.  
       225. def __setitem__(self, key, value):
       226. self._checkOpen()
       227. self._closeCursors()
       228. def wrapF():
      Local variables:
      Name	Value
      key 	'import'
      self 	{'marvintrigger': ...
    * File "/usr/lib/python2.5/bsddb/dbutils.py", line 62, in DeadlockWrap
      Code fragment:
        57. max_retries = _kwargs.get('max_retries', -1)
        58. if _kwargs.has_key('max_retries'):
        59. del _kwargs['max_retries']
        60. while True:
        61. try:
        62. return function(*_args, **_kwargs)
        63. except db.DBLockDeadlockError:
        64. if _deadlock_VerboseFile:
        65. _deadlock_VerboseFile.write(
        66. 'dbutils.DeadlockWrap: sleeping %1.3f\n' % sleeptime)
        67. _sleep(sleeptime)
      Local variables:
      Name	Value
      _args 	()
      _kwargs 	{}
      function 	<function <lambda> at 0xbbbe6a74>
      max_retries 	-1
      sleeptime 	0.0078125
    * File "/usr/lib/python2.5/bsddb/__init__.py", line 223, in <lambda>
      Code fragment:
       218. self._checkOpen()
       219. return _DeadlockWrap(lambda: len(self.db)) # len(self.db)
       220.  
       221. def __getitem__(self, key):
       222. self._checkOpen()
       223. return _DeadlockWrap(lambda: self.db[key]) # self.db[key]
       224.  
       225. def __setitem__(self, key, value):
       226. self._checkOpen()
       227. self._closeCursors()
       228. def wrapF():
      Local variables:
      Name	Value
      key 	'import'
      self 	{'marvintrigger': ...

File "/usr/lib/python2.5/site-packages/Trac-0.11.5rc2-py2.5.egg/trac/web/main.py", line 444, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/lib/python2.5/site-packages/Trac-0.11.5rc2-py2.5.egg/trac/web/main.py", line 205, in dispatch
  resp = chosen_handler.process_request(req)
File "/usr/lib/python2.5/site-packages/Trac-0.11.5rc2-py2.5.egg/trac/search/web_ui.py", line 107, in process_request
  results += list(source.get_search_results(req, terms, filters))
File "build/bdist.linux-i686/egg/tracreposearch/search.py", line 80, in get_search_resultsFile "build/bdist.linux-i686/egg/tracreposearch/indexer.py", line 97, in wrapFile "build/bdist.linux-i686/egg/tracreposearch/indexer.py", line 247, in reindexFile "build/bdist.linux-i686/egg/tracreposearch/indexer.py", line 229, in _invalidate_fileFile "build/bdist.linux-i686/egg/tracreposearch/indexer.py", line 42, in __getitem__File "/usr/lib/python2.5/bsddb/__init__.py", line 223, in __getitem__
  return _DeadlockWrap(lambda: self.db[key])  # self.db[key]
File "/usr/lib/python2.5/bsddb/dbutils.py", line 62, in DeadlockWrap
  return function(*_args, **_kwargs)
File "/usr/lib/python2.5/bsddb/__init__.py", line 223, in <lambda>
  return _DeadlockWrap(lambda: self.db[key])  # self.db[key]

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by rjollos

  • Owner changed from athomas to rjollos

Reassigning ticket after changing maintainer of plugin.

comment:2 Changed 5 years ago by rjollos

  • Resolution set to worksforme
  • Status changed from new to closed

Since this report is 6 months old I'm closing, but please reopen if you wish to work on solving the issue.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.