# Ticket #9803 (closed defect: fixed)

Opened 1 year ago

## "TypeError: 'PooledConnection' object is not callable" error when trying to search Source Repositories

Reported by: Assigned to: patrick ejucovy normal MultiRepoSearchPlugin normal 0.12

I installed the plugin and the "upgrade" and "reindex" completed without errors, but when I try to search I get the error below. I tried searching a few different terms from the Search page as well as the search box that appears at the top of every screen. Search worked just fine when the "Source Repository" checkbox was unchecked.

Please let me know if there is any more info I can provide. Here is the error:

Oops…
Trac detected an internal error:

TypeError: 'PooledConnection' object is not callable

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 trac-MultiRepoSearchPlugin 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 a new bug report describing the problem and explain how to reproduce it.
Python Traceback
Most recent call last:

File "/usr/lib/python2.7/site-packages/trac/web/main.py", line 511, in _dispatch_request
File "/usr/lib/python2.7/site-packages/trac/web/main.py", line 237, in dispatch
File "/usr/lib/python2.7/site-packages/trac/search/web_ui.py", line 102, in process_request
File "/usr/lib/python2.7/site-packages/trac/search/web_ui.py", line 207, in _do_search
File "/usr/lib/python2.7/site-packages/trac_MultiRepoSearchPlugin-0.1-py2.7.egg/multireposearch/search.py", line 87, in get_search_results
File "/usr/lib/python2.7/site-packages/trac_MultiRepoSearchPlugin-0.1-py2.7.egg/multireposearch/sqlindexer.py", line 86, in find_words

System Information:

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.1) Gecko/20100101 Firefox/10.0.1
Trac 	0.12.2
Babel 	0.9.6
Genshi 	0.6
GIT 	1.7.6.1
mod_python 	3.3.1
Pygments 	1.4
pysqlite 	2.6.0
Python 	2.7.2 (default, Jun 29 2011, 11:17:09) [GCC 4.6.1]
pytz 	2010o
setuptools 	0.6
SQLite 	3.7.7.1
Subversion 	1.6.17 (r1128011)
jQuery	1.4.2

Enabled Plugins:
BatchModify 	0.8.0-trac0.12 	/home/trac/swift-git-trac-proj/Trac/swift/plugins/BatchModify-0.8.0_trac0.12-py2.7.egg
trac-MultiRepoSearchPlugin 	0.1 	/usr/lib/python2.7/site-packages/trac_MultiRepoSearchPlugin-0.1-py2.7.egg
TracGit 	0.12.0.5dev 	/usr/lib/python2.7/site-packages/TracGit-0.12.0.5dev-py2.7.egg



## Change History

### 02/16/12 00:11:50 changed by anonymous

• status changed from new to assigned.
• owner changed from ejucovy to anonymous.

### 02/16/12 00:12:06 changed by ejucovy

• owner changed from anonymous to ejucovy.
• status changed from assigned to new.

### 02/16/12 00:12:11 changed by ejucovy

• status changed from new to assigned.

### 02/16/12 01:52:49 changed by rjollos

• description changed.

### 02/16/12 02:42:55 changed by ejucovy

Looks like another case of using DB APIs only introduced in trac 0.13. I've attached a patch that should hopefully correct this one:

I've also tagged a tarball that includes this fix, in case patching doesn't work:

### (follow-up: ↓ 7 ) 02/16/12 23:06:26 changed by patrick

That fixed the problem and I am now able to search the git repo. Thanks!

It searches the code but not the commit messages; is that expected?

### (in reply to: ↑ 6 ; follow-up: ↓ 9 ) 02/16/12 23:24:58 changed by anonymous

That fixed the problem and I am now able to search the git repo. Thanks!

Great! (Is searching the SVN repo also working? :-)

It searches the code but not the commit messages; is that expected?

That is expected, yes.

Searching against "changesets" (from Trac core) should search commit messages -- but, on my own installations, this doesn't seem to be working for Git repositories. I'll post a follow up comment here if I post a bug report for the TracGitPlugin.

### (follow-up: ↓ 10 ) 02/16/12 23:35:14 changed by patrick

• status changed from assigned to closed.
• resolution set to fixed.

I tried indexing the SVN repo and it caused my SQLite database to expand to fill up the disk it is on (which currently has ~4 gigs available, so it didn't have a lot of free space to begin with).

I'm closing this ticket since the problem I originally reported is fixed. Thanks for the great work!

### (in reply to: ↑ 7 ) 02/17/12 16:52:23 changed by ejucovy

Searching against "changesets" (from Trac core) should search commit messages -- but, on my own installations, this doesn't seem to be working for Git repositories. I'll post a follow up comment here if I post a bug report for the TracGitPlugin.

For the GitPlugin, searching against commit messages only works if you set the option

[git]
cached_repository = true


and run trac-admin <site> repository resync "*". The GitPlugin will then cache changeset information in the trac database, making it available in searches.

### (in reply to: ↑ 8 ) 02/17/12 17:00:03 changed by ejucovy

I tried indexing the SVN repo and it caused my SQLite database to expand to fill up the disk it is on (which currently has ~4 gigs available, so it didn't have a lot of free space to begin with).

Oof. Eventually I'd love to have support for alternative search strategies that can deal with situations like this. The plugin's design allows for any number of search backends, so it's just a matter of figuring out what strategy would work best for this. And implementing it. :-)

I'm closing this ticket since the problem I originally reported is fixed. Thanks for the great work!

Thanks -- I just tagged and released a 0.2.1 with this fix.

### Add/Change #9803 ("TypeError: 'PooledConnection' object is not callable" error when trying to search Source Repositories)

Change Properties