CDS Invenio: bibrank exceptions [SOLVED]
The problem
Our Invenio was spitting exceptions like the following:
Forced traceback (most recent call last) File "/usr/lib64/python2.4/site-packages/invenio/bibrank.py", line 150, in task_run_core func_object(key) File "/usr/lib64/python2.4/site-packages/invenio/bibrank_word_indexer.py", line 1210, in word_similarity return word_index(run) File "/usr/lib64/python2.4/site-packages/invenio/bibrank_word_indexer.py", line 839, in word_index update_rnkWORD(options["table"], options["modified_words"]) Traceback (most recent call last): File "/usr/lib64/python2.4/site-packages/invenio/bibrank_word_indexer.py", line 1114, in update_rnkWORD Nj[j] = Nj.get(j, 0) + math.pow(Gi[t] * (1 + math.log(tf[0])), 2) OverflowError: math range error
More precisely, this one is related to record 4573:
Error when analysing the record 4573 (((3350, 'x\x9cu\x93\xdbr\xdc \x0c\x867\xa7\xa69\xf59z\xd9W\xd2b\xd9V\x02\x88\n\xd8\xcd\xb4/\x1f\xe4MvfA\xb90c\xe6\x1f\x1d\xf8\xf4\xeb\x7f~\xdc\xedvB\x18 F\x82\xf8\xfb\xba]\xe9J\x8f\xf6\xed\xf2C;V\x94\x08q\xc2\x7f\'\xf1\xfa,\xfeh\x87\xe3\x90j\xe9\xc3T\x99pf\t\x96\x128\x92\x03+[\xc0"\xe4\xfa\x98{m\x11\x17\xcaEN\xd2\xcbY\xbaU\t\nZe\x04s\xf5\xa5/\xf3S\xcb@\xa4\x99\xfdd\x15ZZ6\xa8\xefVB\x90B\xce\xf7\xca\x9d\x1e+\x1f\x07v\xf7\x1b\x84\xec0\x9a|\x94\x1c\x88\x99-\x81\xfb|\xd1\xcdE\xb6\x84b1\xd5\'\x81sU\xc0\x91\x95/\xd6\x80v\xa1b\xa0S\xa4\x1ed\xb1\xac\x00~a\xa1\xb2\x9ac\xc5\xf7\xd6\xdf\xd0\xc0\x06.Ba\xdb\nXV\x9e\xfa\xb7n\xf6\xa1yF\xb6\x9e:\xd7\xe8\n\xf1\xc0\xfbf\x9bl\xb2\xcaD<\x96\xaf\x80_\x17\x08\xa6\xd6\xf2\xc1b\xc3\xa9P\xe8#\x94\r\x05\x18\xd8h[\x8b\xc0D\xc6\xac\xef6S\xd5\x9c\xfbd\nt\x16\x08xdy\xb3\xccS .FB\x95\xf6\xaf\xd8\x18\x0c\x8d\xebu?\x8cZ\xbb\x8e\xf4\xb7\x9aK\xc2\xfb\x
But a lot of records (4573, 4336, 4487, 4337, … ) were producing similar errors every time my scheduled bibrank task was run…
The fix
[Thank you so much, Samuele Kaplun!]
This is normally due to word similarities indexes that accumulated too much
errors and need to be re-balanced. You can safely discard these exceptions
(though it’s true they might quickly fill your mailbox
).
Usually bibrank word similarity indexes are built in a fast way that works
most of the time, but is approximate and lead to some approximation errors
after a certain usage period.
To solve this, you usually just need to schedule (e.g. weekly) a bibrank -R to
rebalance these indexes.
Try e.g. with:
$ sudo -u apache /opt/cds-invenio/bin/bibrank -R -wwrd -s7d -uadmin
and see if this solve your problem.
(See also this linkwhere this is
also short-explained).
Related posts:
- CDS Invenio v1.0 bibclassify exceptions when 404 error
- [Errno 13] Permission denied: ‘/root/.python-eggs’ [SOLVED]
- CDS-Invenio: [notice] mod_python: (Re)importing module ‘mod_python.publisher’
- Python & Oracle [SOLVED] ImportError: libclntsh.so.11.1: wrong ELF class: ELFCLASS32
- CDS Invenio: Internet Explorer 8, https, css and images not loading [SOLVED]