#9803 closed defect (fixed)
"TypeError: 'PooledConnection' object is not callable" error when trying to search Source Repositories
Reported by: | patrick | Owned by: | ejucovy |
---|---|---|---|
Priority: | normal | Component: | MultiRepoSearchPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description (last modified by )
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
Attachments (1)
Change History (11)
comment:1 Changed 13 years ago by
Owner: | changed from ejucovy to anonymous |
---|---|
Status: | new → assigned |
comment:2 Changed 13 years ago by
Owner: | changed from anonymous to ejucovy |
---|---|
Status: | assigned → new |
comment:3 Changed 13 years ago by
Status: | new → assigned |
---|
comment:4 Changed 13 years ago by
Description: | modified (diff) |
---|
Changed 13 years ago by
Attachment: | cursor.diff added |
---|
comment:5 Changed 13 years ago by
comment:6 follow-up: 7 Changed 13 years ago by
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?
comment:7 follow-up: 9 Changed 13 years ago by
Replying to patrick:
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.
comment:8 follow-up: 10 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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!
comment:9 Changed 13 years ago by
Replying to anonymous:
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.
comment:10 Changed 13 years ago by
Replying to patrick:
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.
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:
http://trac-hacks.org/attachment/ticket/9803/cursor.diff
I've also tagged a tarball that includes this fix, in case patching doesn't work:
https://github.com/boldprogressives/trac-MultiRepoSearchPlugin/tarball/th-9803