Modify

Opened 9 years ago

Closed 5 years ago

#371 closed defect (wontfix)

Trac detected an internal error:

Reported by: tluk@… Owned by: rjollos
Priority: high Component: RepoSearchPlugin
Severity: blocker Keywords:
Cc: lasudry@… Trac Release: 0.9

Description (last modified by coderanger)

If doesn't work for me, i did used trunk on a windows box couple days ago..

today i checkout latest trunk in a freebsd box.. it stoped working

trac 10DEV, python2.4, mod_python3.28, apache2.2


Python Traceback

Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 299, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 189, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.4/site-packages/trac/Search.py", line 181, in process_request
    results += list(source.get_search_results(req, terms, filters))
  File "build/bdist.freebsd-6.1-STABLE-i386/egg/tracreposearch/search.py", line 80, in get_search_results
  File "build/bdist.freebsd-6.1-STABLE-i386/egg/tracreposearch/indexer.py", line 97, in wrap
  File "build/bdist.freebsd-6.1-STABLE-i386/egg/tracreposearch/indexer.py", line 247, in reindex
  File "build/bdist.freebsd-6.1-STABLE-i386/egg/tracreposearch/indexer.py", line 227, in _invalidate_file
  File "build/bdist.freebsd-6.1-STABLE-i386/egg/tracreposearch/indexer.py", line 36, in __contains__
TypeError: iterable argument required

Attachments (0)

Change History (16)

comment:1 Changed 9 years ago by coderanger

  • Description modified (diff)

Fixing formatting

comment:2 Changed 9 years ago by athomas

I can not replicate this. Try clearing the index from the egg cache.

comment:3 Changed 9 years ago by anonymous

This could be a indexer error..

After i clear the cache then i search again. the page seems waiting for the indexer to work.. however,

i don't notice any cpu nor disc activity..

this could be other problem.. but i definitly cannot see the indexing happening..

May be, in future release upon indexing activity we could provide a message in the page such as

"Performing/Refreshing Indexing of your files" etc..

comment:4 Changed 9 years ago by athomas

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

Yes, possibly. I'll close this ticket, however feel free to create an enhancement ticket with that idea.

comment:5 Changed 8 years ago by graham@…

  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Trac Release changed from 0.10 to 0.9

I am having exactly the same problems as mentioned above

I am running Trac 0.9.5 Python 2.4.3 (#2, Apr 27 2006, 19:24:41) [GCC 3.4.2 [FreeBSD] 20040728] on freebsd5

The egg was built from the 0.9 version

I have removed the index files this makes no difference I also notice that they are all reporting the same size as follows :-

root@maelstrom /usr/local/www/peggcache/.idx
$ ls -la
total 84
drwxr-xr-x    2 www      www           512 Jul 17 01:00 .
drwxrwxrwx    5 www      www           512 Jul 17 01:00 ..
-rw-r--r--    1 www      www         16384 Jul 17 01:00 bigrams.db.db
-rw-r--r--    1 www      www         16384 Jul 17 01:00 files.db.db
-rw-r--r--    1 www      www         16384 Jul 17 01:00 meta.db.db
-rw-r--r--    1 www      www         16384 Jul 17 01:00 revs.db.db
-rw-r--r--    1 www      www         16384 Jul 17 01:00 words.db.db

Here follows the error and trace as produced when running a search ( running a search with just the source checkbox or with others checked as well produces the same results).

Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/trac/web/modpython_frontend.py", line 206, in handler
    dispatch_request(mpr.path_info, mpr, env)
  File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 139, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 107, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.4/site-packages/trac/Search.py", line 158, in process_request
    results += list(source.get_search_results(req, query, filters))
  File "build/bdist.freebsd-5.3-RELEASE-i386/egg/tracreposearch/search.py", line 77, in get_search_results
  File "build/bdist.freebsd-5.3-RELEASE-i386/egg/tracreposearch/indexer.py", line 72, in wrap
  File "build/bdist.freebsd-5.3-RELEASE-i386/egg/tracreposearch/indexer.py", line 211, in reindex
  File "build/bdist.freebsd-5.3-RELEASE-i386/egg/tracreposearch/indexer.py", line 193, in _invalidate_file
  File "build/bdist.freebsd-5.3-RELEASE-i386/egg/tracreposearch/indexer.py", line 31, in __contains__
TypeError: iterable argument required

comment:6 Changed 8 years ago by cryx-trachacks@…

If have the same setup as above with trac 0.9.6, python 2.4.2 and FreeBSD 6.1, getting the errors too.

My lighttpd gives the following error when I try to search the repository for the first time:

Exception exceptions.AssertionError: <exceptions.AssertionError instance at 0x86355cc> in <boundmethod PooledConnection.del of <trac.db.PooledConnection object at 0x864260c>> ignored

comment:7 Changed 8 years ago by fabian@…

Same stacktrace and ls of the index dir here for trac 0.9.6 on FBSD 6, python 2.4.3, apache+mod_python.

comment:8 Changed 8 years ago by athomas

I should be able to migrate the RepoSearchPlugin to Pyndexter soon. I suspect this will fix most of these problems, as well as providing a healthy performance boost.

comment:9 Changed 8 years ago by athomas

(In [1881]) Not for the faint of heart, but if anybody wants to test the pyndexter branch it would be most useful to get some feedback.

You will need the refactoring branch of pyndexter, available from here.

More info in the README.

References #362, #371, #385 and #388.

comment:10 Changed 7 years ago by lasudry@…

  • Cc lasudry@… added; anonymous removed

First try of your solution proposal :

'refactoring' branch of pyndexter and pyndexter branch of reposearchplugin installed ...

Got this error in Trac (0.10) :

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 183, in dispatch
    req.perm = PermissionCache(self.env, req.authname)
  File "/usr/lib/python2.4/site-packages/trac/perm.py", line 263, in __init__
    self.perms = PermissionSystem(env).get_user_permissions(username)
  File "/usr/lib/python2.4/site-packages/trac/perm.py", line 213, in get_user_permissions
    for requestor in self.requestors:
  File "/usr/lib/python2.4/site-packages/trac/core.py", line 55, in extensions
    return filter(None, [component.compmgr[cls] for cls in extensions])
  File "/usr/lib/python2.4/site-packages/trac/core.py", line 179, in __getitem__
    component = cls(self)
  File "/usr/lib/python2.4/site-packages/trac/core.py", line 98, in maybe_init
    init(self)
  File "build/bdist.linux-i686/egg/tracreposearch/__init__.py", line 134, in __init__
  File "build/bdist.linux-i686/egg/pyndexter/__init__.py", line 611, in __init__
  File "build/bdist.linux-i686/egg/pyndexter/__init__.py", line 722, in _load_plugin
  File "build/bdist.linux-i686/egg/pyndexter/util.py", line 42, in __init__
ValueError: Invalid URI


And this one with ./update-index :

Traceback (most recent call last):
  File "./update-index", line 12, in ?
    s = TracRepoSearchPlugin(e)
  File "/usr/lib/python2.4/site-packages/trac/core.py", line 98, in maybe_init
    init(self)
  File "/var/trac/netitbe/plugins/reposearchpatched/tracreposearch/__init__.py", line 134, in __init__
    self.framework = pyndexter.Framework(self.indexer)
  File "/usr/lib/python2.4/site-packages/PIL/__init__.py", line 611, in __init__
    
  File "/usr/lib/python2.4/site-packages/PIL/__init__.py", line 722, in _load_plugin
    
  File "build/bdist.linux-i686/egg/pyndexter/util.py", line 42, in __init__
ValueError: Invalid URI


Any ideas before pdb ?

comment:11 Changed 7 years ago by athomas

Ping. I'm still working on this.

comment:12 Changed 7 years ago by anonymous

  • Priority changed from highest to high

comment:13 Changed 7 years ago by Evan

I'm getting this as well. I tried pyndexter and that didn't work either, though it gave different errors. I've tried 0.1, 0.2, and 0.3 and none of them works. Additionally, when I try to run "update-index" (as I guessed that the lack of anything iterable in the index directory may be the cause) I get some exceptions thrown:

[root@repository ~/reposearchplugin/0.10]# ./update-index /usr/local/trac/
/usr/local/lib/python2.4/site-packages/trac/loader.py:96: UserWarning: Module tracreposearch was already imported from /root/reposearchplugin/0.10/tracreposearch/__init__.pyc, but /usr/local/trac/plugins/tracreposearch-0.2-py2.4.egg is being added to sys.path
  egg.activate()
Exception exceptions.AttributeError: 'sync' in <bound method psetdict.__del__ of <tracreposearch.indexer.psetdict object at 0x8715a2c>> ignored
Exception exceptions.AttributeError: 'sync' in <bound method psetdict.__del__ of <tracreposearch.indexer.psetdict object at 0x8715a6c>> ignored
Exception exceptions.AttributeError: 'sync' in <bound method psetdict.__del__ of <tracreposearch.indexer.psetdict object at 0x8715a4c>> ignored
[root@repository ~/reposearchplugin/0.10]# uname -rsm
FreeBSD 6.2-STABLE i386

Here's the error I get with tracreposearch-0.1-py2.4.egg in /usr/local/trac/plugins:

2007-11-05 15:36:25,741 Trac[main] ERROR: iterable argument required
Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 387, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 238, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.4/site-packages/trac/Search.py", line 181, in process_request
    results += list(source.get_search_results(req, terms, filters))
  File "build/bdist.freebsd-6.2-STABLE-i386/egg/tracreposearch/search.py", line 77, in get_search_results
  File "build/bdist.freebsd-6.2-STABLE-i386/egg/tracreposearch/indexer.py", line 72, in wrap
  File "build/bdist.freebsd-6.2-STABLE-i386/egg/tracreposearch/indexer.py", line 211, in reindex
  File "build/bdist.freebsd-6.2-STABLE-i386/egg/tracreposearch/indexer.py", line 193, in _invalidate_file
  File "build/bdist.freebsd-6.2-STABLE-i386/egg/tracreposearch/indexer.py", line 31, in __contains__
TypeError: iterable argument required

Here's the error with tracreposearch-0.2-py2.4.egg:

==> /var/log/trac/trac.log <==
2007-11-05 15:37:11,846 Trac[main] ERROR: iterable argument required
Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 387, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 238, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.4/site-packages/trac/Search.py", line 181, in process_request
    results += list(source.get_search_results(req, terms, filters))
  File "build/bdist.freebsd-6.2-STABLE-i386/egg/tracreposearch/search.py", line 80, in get_search_results
  File "build/bdist.freebsd-6.2-STABLE-i386/egg/tracreposearch/indexer.py", line 97, in wrap
  File "build/bdist.freebsd-6.2-STABLE-i386/egg/tracreposearch/indexer.py", line 247, in reindex
  File "build/bdist.freebsd-6.2-STABLE-i386/egg/tracreposearch/indexer.py", line 227, in _invalidate_file
  File "build/bdist.freebsd-6.2-STABLE-i386/egg/tracreposearch/indexer.py", line 36, in __contains__
TypeError: iterable argument required

The error I get with 0.3 is something about the "templates" table not being found:

2007-11-05 15:45:12,705 Trac[main] ERROR: no such table: templates
Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 387, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 238, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.4/site-packages/trac/Search.py", line 181, in process_request
    results += list(source.get_search_results(req, terms, filters))
  File "/usr/local/lib/python2.4/site-packages/TracWikiTemplates-0.3.0rc3-py2.4.egg/WikiTemplates/web_ui.py", line 615, in
 get_search_results
  File "/usr/local/lib/python2.4/site-packages/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/local/lib/python2.4/site-packages/trac/db/sqlite_backend.py", line 56, in execute
    args or [])
  File "/usr/local/lib/python2.4/site-packages/trac/db/sqlite_backend.py", line 48, in _rollback_on_error
    return function(self, *args, **kwargs)
OperationalError: no such table: templates

comment:14 follow-up: Changed 7 years ago by Evan

Is this plugin still being maintained?

comment:15 Changed 5 years ago by rjollos

  • Owner changed from athomas to rjollos
  • Status changed from reopened to new

Reassigning ticket after changing maintainer of plugin.

comment:16 in reply to: ↑ 14 Changed 5 years ago by rjollos

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

Replying to Evan:

Is this plugin still being maintained?

I don't intend to maintain versions < 0.10, but intend to get a good working 0.11 version in place.

Add Comment

Modify Ticket

Action
as closed The owner will remain rjollos.
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.