Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to index the dictionary after upgrading python-whoosh. #22

Open
bonidydy opened this issue May 8, 2015 · 7 comments
Open

Failure to index the dictionary after upgrading python-whoosh. #22

bonidydy opened this issue May 8, 2015 · 7 comments

Comments

@bonidydy
Copy link

bonidydy commented May 8, 2015

After upgrading python-whoosh from version 2.5.7 to 2.7.0 ldoce5viewer fails to index the dictionary. Here is a log from the indexing:

Building the file-location lookup table...
Analyzing 'picture'...
Analyzing 'fs'...
Analyzing 'gb_hwd_pron'...
Analyzing 'sfx'...
Analyzing 'sound'...
Analyzing 'thesaurus'...
Analyzing 'etymologies'...
Analyzing 'examples'...
Analyzing 'activator_concept'...
Analyzing 'common_errors'...
Analyzing 'activator_section'...
Analyzing 'verb_forms'...
Analyzing 'us_hwd_pron'...
Analyzing 'collocations'...
Analyzing 'word_sets'...
Analyzing 'phrases'...
Analyzing 'word_lists'...
Analyzing 'menus'...
Analyzing 'word_families'...
Analyzing 'gram'...
Analyzing 'activator'...
Analyzing 'exa_pron'...
Finalizing...
Scanning entry files...
10000 items found
20000 items found
...
412755 items were found.
Making the word variation database...
Finalizing...
Done.
Scanning language-activator files...
Done.
Building the incremental search index...
10000 items added
20000 items added
...
209518 items were added.
Finalizing...
Done.
Building the full text search index for headwords and phrases...
Error occurred
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/ldoce5viewer/qtgui/indexer.py", line 438, in run
self._make_index()
File "/usr/local/lib/python2.7/dist-packages/ldoce5viewer/qtgui/indexer.py", line 397, in _make_index
make_full_hp(scan_temp)
File "/usr/local/lib/python2.7/dist-packages/ldoce5viewer/qtgui/indexer.py", line 356, in make_full_hp
label, path, prio, sortkey)
File "/usr/local/lib/python2.7/dist-packages/ldoce5viewer/fulltext.py", line 176, in add_item
data=(label, path, prio, normalize_index_key(sortkey))
File "/usr/lib/python2.7/dist-packages/whoosh/writing.py", line 750, in add_document
for tbytes, freq, weight, vbytes in items:
File "/usr/lib/python2.7/dist-packages/whoosh/fields.py", line 164, in index
for tstring, freq, wt, vbytes in word_values(value, ana, *_kwargs):
File "/usr/lib/python2.7/dist-packages/whoosh/formats.py", line 146, in word_values
wordset = set(t.text for t in tokens(value, analyzer, kwargs))
File "/usr/lib/python2.7/dist-packages/whoosh/formats.py", line 125, in tokens
gen = analyzer(value, *_kwargs)
TypeError: 'NoneType' object is not callable
Removing files...
Failed to create index

How to fix it?

@f3n9
Copy link

f3n9 commented May 21, 2015

I am using Fedora 22 beta x64. I fixed this issue by removing whoose 2.7.0 from PIP and reinstalling phython-whoosh rpm from official fedora repo.

@bonidydy
Copy link
Author

bonidydy commented Jun 1, 2015

My 2.7.0 whoosh is not installed by PIP but stock package from Debian Sid.

@erness
Copy link
Contributor

erness commented Jun 10, 2015

My ugly solution is to run ldoce5viewer in a virtualenv with whoosh version 2.5.7 and after indexed run without virtualenv

@alm413
Copy link

alm413 commented Sep 20, 2015

As of late, I am having the same issue on Arch Linux. AUR has recently stopped supporting the package. Did anybody come up with a solution?

@alm413
Copy link

alm413 commented Sep 20, 2015

This is what I get

Error occurred
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/ldoce5viewer/qtgui/indexer.py", line 438, in run
self._make_index()
File "/usr/lib/python3.4/site-packages/ldoce5viewer/qtgui/indexer.py", line 397, in _make_index
make_full_hp(scan_temp)
File "/usr/lib/python3.4/site-packages/ldoce5viewer/qtgui/indexer.py", line 356, in make_full_hp
label, path, prio, sortkey)
File "/usr/lib/python3.4/site-packages/ldoce5viewer/fulltext.py", line 176, in add_item
data=(label, path, prio, normalize_index_key(sortkey))
File "/usr/lib/python3.4/site-packages/whoosh/writing.py", line 750, in add_document
for tbytes, freq, weight, vbytes in items:
File "/usr/lib/python3.4/site-packages/whoosh/fields.py", line 164, in index
for tstring, freq, wt, vbytes in word_values(value, ana, *_kwargs):
File "/usr/lib/python3.4/site-packages/whoosh/formats.py", line 146, in word_values
wordset = set(t.text for t in tokens(value, analyzer, kwargs))
File "/usr/lib/python3.4/site-packages/whoosh/formats.py", line 125, in tokens
gen = analyzer(value, *_kwargs)
TypeError: 'NoneType' object is not callable
Removing files...
Failed to create index

@mgundogdu1
Copy link

I had same problem and I solved. Read on this link:
http://manjaro-tr.org/forum/index.php?topic=975.msg8772;topicseen#msg8772

@linluc
Copy link

linluc commented Aug 5, 2017

See my solution proposed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants