Invenio Developer Forum - JavaScript toolkit frameworks - today at 16:45 CET
Hello: The next Invenio Developer Forum will take place today at 16:45 CET in (i) CERN room 31-S-023 and in (ii) Vidyo videoconferencing room at: https://vidyoportal.cern.ch/flex.html?roomdirect.htmlkey=ygjcGzMEk8re Today, Harris will present his JavaScript toolkit and plugins motivated by CDS multimedia and related use cases. Afterwards we shall muse on possibly adopting a JS MVC framework: http://invenio-software.org/wiki/Talk/JSFrameworks Please feel free to add your JS MVC opinions to the above wiki even before the meeting! Best regards -- Tibor Simko
Re: Invenio Developer Forum - JavaScript toolkit frameworks - today at 16:45 CET
On 11.11.2013 09:49, Tibor Simko wrote: Hi! As usual 16:45 is not possible for me. Anyway some small input from HGF... In http://invenio-software.org/wiki/Talk/UIFrameworks you mention about jQueryUI that Invenio doesn't use it too much but you seem (to my reading) generally quite open to drop it. I may say, that cause Invenio started using jQueryUI we at HGF adopted jQuery for all our local additions. Mainly tokeninput in an debugged and adopted version. As every unwritten line of code (especially JS) is a good line of code we tried to minimize it. However, for a rich web GUI, unfortunately... Anyway, our project (and myself as well ;) would be quite happy if we'd not need to redo everything again to adopt a common look and feel. Probably there's some option available in your musings. -- Kind regards, Alexander Wagner Scientific Services / Scientific Publishing Central Library 52425 Juelich mail : a.wag...@fz-juelich.de phone: +49 2461 61-1586 Fax : +49 2461 61-6103 http://www.fz-juelich.de/zb/wp Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt
Re: argument of type 'NoneType' is not iterable for filetype/itemcount indexes and deleted records
Hi Theodoros, On 11/11/2013 01:38 PM, Theodoros Theodoropoulos wrote: Hello all, I recently deleted the demo records in a demo site (running latest master) by replacing all 113 demo records with an empty xml containing only 001 and 980__c:DELETED. For this, I used bibupload -r and everything seemed fine. But when I tried running: sudo -u apache /opt/invenio/bin/bibindex -w filetype -R I got: 2013-11-11 14:20:37 -- Creating new tmp index tables for id 25 2013-11-11 14:20:37 -- tmp_idxWORD25F contains 0 words from 0 records 2013-11-11 14:20:37 -- tmp_idxWORD25F is in consistent state 2013-11-11 14:20:37 -- tmp_idxWORD25F for 1-113 is in consistent state 2013-11-11 14:20:37 -- tmp_idxWORD25F adding records #1-#113 started 2013-11-11 14:20:37 -- Exception caught: argument of type 'NoneType' is not iterable 2013-11-11 14:20:37 -- Exception caught: argument of type 'NoneType' is not iterable 2013-11-11 14:20:37 -- tmp_idxWORD25F normal wordtable flush started 2013-11-11 14:20:37 -- ...updating 0 words into tmp_idxWORD25F started 2013-11-11 14:20:37 -- ...updating 0 words into tmp_idxWORD25F ended 2013-11-11 14:20:37 -- ...updating reverse table tmp_idxWORD25R started 2013-11-11 14:20:37 -- ...updating reverse table tmp_idxWORD25R ended 2013-11-11 14:20:37 -- tmp_idxWORD25F normal wordtable flush ended 2013-11-11 14:20:37 -- Traceback (most recent call last): File /usr/lib64/python2.6/site-packages/invenio/bibtask.py, line 984, in _task_run if callable(task_run_fnc) and task_run_fnc(): File /usr/lib64/python2.6/site-packages/invenio/bibindex_engine.py, line 1435, in task_run_core wordTable.add_recIDs_by_date(task_get_option(modified), task_get_option(flush)) File /usr/lib64/python2.6/site-packages/invenio/bibindex_engine.py, line 821, in add_recIDs_by_date self.add_recIDs(alist, opt_flush) File /usr/lib64/python2.6/site-packages/invenio/bibindex_engine.py, line 757, in add_recIDs just_processed = self.add_recID_range(i_low, i_high) File /usr/lib64/python2.6/site-packages/invenio/bibindex_engine.py, line 883, in add_recID_range record = get_record(recID) File /usr/lib64/python2.6/site-packages/invenio/bibfield.py, line 109, in get_record record = CFG_BIBFIELD_READERS['bibfield_%sreader.py' % (blob_wrapper.master_format,)](blob_wrapper) File /usr/lib64/python2.6/site-packages/invenio/bibfield_jsonreader.py, line 76, in __init__ self._translate() File /usr/lib64/python2.6/site-packages/invenio/bibfield_jsonreader.py, line 234, in _translate self._unpack_rule(json_id, field_name) File /usr/lib64/python2.6/site-packages/invenio/bibfield_jsonreader.py, line 261, in _unpack_rule return self._apply_virtual_rule(field_name, rule_def['aliases'], rule_def['rules'], rule_def['type']) File /usr/lib64/python2.6/site-packages/invenio/bibfield_jsonreader.py, line 310, in _apply_virtual_rule if rule['only_if'] and not all(self._try_to_eval(rule['only_if'])): File /usr/lib64/python2.6/site-packages/invenio/bibfield_utils.py, line 352, in _try_to_eval res = eval(string, globals().update(context), locals()) # kwalitee: disable=eval File string, line 1, in module TypeError: argument of type 'NoneType' is not iterable 2013-11-11 14:20:38 -- Task #123 finished. [CERROR] The same applies for itemcount index: sudo -u apache /opt/invenio/bin/bibindex -w itemcount -R All other indexes work fine. Can you imagine what's going wrong or should I include the whole stack from the relevant exception in my mail? This is happening because this is a virtual field that is not comming from marc directly. Running inveniocfg --load-bibfield-conf should solve the problem. Cheers, Esteban -- Esteban J. G. Gabancho Software Engineer CERN, IT Department, Digital Library Services Section
Re: argument of type 'NoneType' is not iterable for filetype/itemcount indexes and deleted records
On 11/11/2013 01:50 PM, Theodoros Theodoropoulos wrote: Hello Esteban, On 11/11/2013 2:48 μμ, Esteban J. G. Gabancho wrote: This is happening because this is a virtual field that is not comming from marc directly. Running inveniocfg --load-bibfield-conf should solve the problem. Well, unfortunately it doesn't :( I even tried truncating PAIR/WORD/PHRASE25 [F/R] indexes and rerun bibindex, but got the same error. I was able to reproduce the error in my machine I found what was cousing it, I atach you a very little patch. Once you apply it could you please run: inveniocfg --load-bibfield-conf dbexec echo DELETE FROM bibfmt WHERE format='recjson' Cheers, Esteban. -- Esteban J. G. Gabancho Software Engineer CERN, IT Department, Digital Library Services Section From 9f89b1a5bfaeac6ad84f8b3ef37940c6c3ce87fd Mon Sep 17 00:00:00 2001 From: Esteban J. G. Gabancho egaban...@gmail.com Date: Mon, 11 Nov 2013 14:21:05 +0100 Subject: [PATCH] BibField: fix number_of_copies field --- modules/bibfield/etc/atlantis.cfg |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/bibfield/etc/atlantis.cfg b/modules/bibfield/etc/atlantis.cfg index ba9dc12..a2083ea 100644 --- a/modules/bibfield/etc/atlantis.cfg +++ b/modules/bibfield/etc/atlantis.cfg @@ -1120,7 +1120,7 @@ _number_of_copies: calculated: @parse_first(('recid', 'collection')) @depends_on(('recid', 'collection.primary')) -@only_if(('BOOK' in self['collection.primary'],)) +@only_if(('BOOK' in self.get('collection.primary', []),)) get_number_of_copies(self['recid']) checker: check_field_existence(0, 1) -- 1.7.10.4
Re: argument of type 'NoneType' is not iterable for filetype/itemcount indexes and deleted records [SOLVED]
Thanks Esteban, with the patch the [re]indexing works :) Cheers, Theodoros On 11/11/2013 3:23 μμ, Esteban J. G. Gabancho wrote: I was able to reproduce the error in my machine I found what was cousing it, I atach you a very little patch. Once you apply it could you please run: inveniocfg --load-bibfield-conf dbexec echo DELETE FROM bibfmt WHERE format='recjson' Cheers, Esteban.
Error when reverting a deleted record from Bibedit (gui)
In bibedit, i tried to revert back a DELETED record and got the following error: 2013-11-11 15:07:57 -- Task #131 started. 2013-11-11 15:07:57 -- Input file '/opt/invenio/var/tmp-shared/bibedit-cache/bibedit_record_2_1.xml', input mode 'replace'. 2013-11-11 15:07:57 -- -ERROR: Missing 005 - 2013-11-11 15:07:57 -- Traceback (most recent call last): File /usr/lib64/python2.6/site-packages/invenio/bibtask.py, line 984, in _task_run if callable(task_run_fnc) and task_run_fnc(): File /usr/lib64/python2.6/site-packages/invenio/bibupload.py, line 2912, in task_run_core results_for_callback=results_for_callback) File /usr/lib64/python2.6/site-packages/invenio/bibupload.py, line 2837, in bibupload_records tmp_vers = tmp_vers) File /usr/lib64/python2.6/site-packages/invenio/bibupload.py, line 332, in bibupload submit_ticket_for_holding_pen(rec_id, err, Missing 005. Inserting record into holding pen.) File /usr/lib64/python2.6/site-packages/invenio/bibupload.py, line 741, in submit_ticket_for_holding_pen bibcatalog_system.ticket_submit(subject=%s: %s by %s % (msg, rec_id, user), recordid=rec_id, text=text, queue=CFG_BIBUPLOAD_CONFLICTING_REVISION_TICKET_QUEUE, owner=uid) File /usr/lib64/python2.6/site-packages/invenio/bibcatalog_system_email.py, line 88, in ticket_submit ownerset = owner: + escape_shell_arg(owner) + '\n' File /usr/lib64/python2.6/site-packages/invenio/shellutils.py, line 298, in escape_shell_arg raise TypeError(msg) TypeError: ERROR: escape_shell_arg() expected string argument but got '1L' of type 'type 'long''. 2013-11-11 15:07:57 -- Task #131 finished. [CERROR] FYI, /opt/invenio/var/tmp-shared/bibedit-cache/bibedit_record_2_1.xml DOES have a 005 field and is: controlfield tag=00520130514094613.0/controlfield Any ideas? Cheers, Theodoros
Re: Error when reverting a deleted record from Bibedit (gui)
Hi Theodoros, This was fixed in the following commit, yet to be merged, you can apply the patch. http://invenio-software.org/repo/invenio-inspire-ops/commit/?h=prodid=ef24cf657ebc4a18d8a14074105e10b01a4b05c0 Cheers On Nov 11, 2013, at 2:48 PM, Theodoros Theodoropoulos th...@physics.auth.grmailto:th...@physics.auth.gr wrote: In bibedit, i tried to revert back a DELETED record and got the following error: 2013-11-11 15:07:57 -- Task #131 started. 2013-11-11 15:07:57 -- Input file '/opt/invenio/var/tmp-shared/bibedit-cache/bibedit_record_2_1.xml', input mode 'replace'. 2013-11-11 15:07:57 -- -ERROR: Missing 005 - 2013-11-11 15:07:57 -- Traceback (most recent call last): File /usr/lib64/python2.6/site-packages/invenio/bibtask.py, line 984, in _task_run if callable(task_run_fnc) and task_run_fnc(): File /usr/lib64/python2.6/site-packages/invenio/bibupload.py, line 2912, in task_run_core results_for_callback=results_for_callback) File /usr/lib64/python2.6/site-packages/invenio/bibupload.py, line 2837, in bibupload_records tmp_vers = tmp_vers) File /usr/lib64/python2.6/site-packages/invenio/bibupload.py, line 332, in bibupload submit_ticket_for_holding_pen(rec_id, err, Missing 005. Inserting record into holding pen.) File /usr/lib64/python2.6/site-packages/invenio/bibupload.py, line 741, in submit_ticket_for_holding_pen bibcatalog_system.ticket_submit(subject=%s: %s by %s % (msg, rec_id, user), recordid=rec_id, text=text, queue=CFG_BIBUPLOAD_CONFLICTING_REVISION_TICKET_QUEUE, owner=uid) File /usr/lib64/python2.6/site-packages/invenio/bibcatalog_system_email.py, line 88, in ticket_submit ownerset = owner: + escape_shell_arg(owner) + '\n' File /usr/lib64/python2.6/site-packages/invenio/shellutils.py, line 298, in escape_shell_arg raise TypeError(msg) TypeError: ERROR: escape_shell_arg() expected string argument but got '1L' of type 'type 'long''. 2013-11-11 15:07:57 -- Task #131 finished. [CERROR] FYI, /opt/invenio/var/tmp-shared/bibedit-cache/bibedit_record_2_1.xml DOES have a 005 field and is: controlfield tag=00520130514094613.0/controlfield Any ideas? Cheers, Theodoros
Exception in bibrank (citerank_citation_t) with empty citations table
Hello everyone, It seems that when there are no citations in a site's records, the bibrank job (more specifically the citerank_citation_t method) produces an exception and the whole bibrank job stops. This is part of the relevant log: 2013-11-12 08:11:49 -- size of reversedict 10 2013-11-12 08:11:49 -- size of citationdict 10 2013-11-12 08:11:49 -- size of selfcitedbydict 10 2013-11-12 08:11:49 -- size of selfcitdict 10 2013-11-12 08:11:49 -- Total time of get_citation_weight(): 237.47 sec 2013-11-12 08:11:49 -- No need to update the indexes for citations. 2013-11-12 08:11:49 -- Running rank method: citerank_citation_t 2013-11-12 08:11:49 -- Error while extracting citation data from rnkCITATIONDATA table 2013-11-12 08:11:49 -- Error: No citations to read! 2013-11-12 08:11:49 -- Error: No citations to read! 2013-11-12 08:11:49 -- Traceback (most recent call last): File /usr/lib64/python2.6/site-packages/invenio/bibtask.py, line 984, in _task_run if callable(task_run_fnc) and task_run_fnc(): File /usr/lib64/python2.6/site-packages/invenio/bibrank.py, line 163, in task_run_core func_object(key) File /usr/lib64/python2.6/site-packages/invenio/bibrank_citerank_indexer.py, line 782, in citerank raise Exception Exception FYI, I have not changed the default citerank_citation_t.cfg Is this something known and maybe(?) fixed in a personal branch or should I create a ticket? Cheers, Theodoros Theodoropoulos