Re: Bibindex and bibencode error

2018-05-15 Thread Tibor Simko
Dear Rita:

On Tue, 15 May 2018, Ricceri Rita wrote:
> sudo -u www-data /opt/invenio/bin/bibindex
>
> ###
> 2018-05-15 16:02:44 --> Unexpected error occurred: Name error:
> 'abstract' field name not defined.

Hmm, `abstract` is a standard field defined in Invenio's default data
model configuration file `modules/bibfield/etc/bibfield.cfg`.

(1) Are you using a different data model on your site?

(2) If you have been upgrading your site, have you run something like:

  $ sudo -u www-data inveniocfg --load-bibfield-conf

to apply field definition changes?

(3) If you did change the data model and/or upgraded throughout several
versions and/or changed your record serialisation rules, and if your
MARC records are displayed otherwise OK, then you can also think of
running:

  $ sudo -u www-data inveniocfg --reset-recjson-cache

that should recreate your JSON record cache based on your MARC data.
(after loading bibfield configuration)

Note that there is also a sister command to reset your Python record
structure cache:

  $ sudo -u www-data inveniocfg --reset-recstruct-cache

P.S. Note the leading "if's"; I guess you should be mostly OK after you
 load the bibfield configuration.

Best regards
--
Tibor Simko


Bibindex and bibencode error

2018-05-15 Thread Ricceri Rita
Dear all,

I have cds-invenio version 1.2.1

The problem is one:

I submit a new video and run

sudo -u www-data /opt/invenio/bin/bibindex

###
2018-05-15 16:02:44 --> Unexpected error occurred: Name error: 'abstract' field 
name not defined.
2018-05-15 16:02:44 --> Traceback is:
2018-05-15 16:02:44 -->   File 
"/usr/local/lib/python2.7/dist-packages/invenio/bibtask.py", line 610, in 
task_init
2018-05-15 16:02:44 --> ret = _task_run(task_run_fnc)
2018-05-15 16:02:44 -->   File 
"/usr/local/lib/python2.7/dist-packages/invenio/bibtask.py", line 1173, in 
_task_run
2018-05-15 16:02:44 --> if callable(task_run_fnc) and task_run_fnc():
2018-05-15 16:02:44 -->   File 
"/usr/local/lib/python2.7/dist-packages/invenio/bibindex_engine.py", line 2196, 
in task_run_core
2018-05-15 16:02:44 --> wordTable.add_recIDs(final_recIDs, 
task_get_option("flush"))
2018-05-15 16:02:44 -->   File 
"/usr/local/lib/python2.7/dist-packages/invenio/bibindex_engine.py", line 1387, 
in add_recIDs
2018-05-15 16:02:44 --> just_processed = self.add_recID_range(i_low, i_high)
2018-05-15 16:02:44 -->   File 
"/usr/local/lib/python2.7/dist-packages/invenio/bibindex_engine.py", line 1434, 
in add_recID_range
2018-05-15 16:02:44 --> wlist = collector.collect(marc, wlist)
2018-05-15 16:02:44 -->   File 
"/usr/local/lib/python2.7/dist-packages/invenio/bibindex_termcollectors.py", 
line 81, in collect
2018-05-15 16:02:44 --> return collector(recIDs, termslist)
2018-05-15 16:02:44 -->   File 
"/usr/local/lib/python2.7/dist-packages/invenio/bibindex_termcollectors.py", 
line 90, in _collect_recjson
2018-05-15 16:02:44 --> record = get_record(recID)
2018-05-15 16:02:44 -->   File 
"/usr/local/lib/python2.7/dist-packages/invenio/bibfield.py", line 128, in 
get_record
2018-05-15 16:02:44 --> record = Record(reader.translate())
2018-05-15 16:02:44 -->   File 
"/usr/local/lib/python2.7/dist-packages/invenio/bibfield_reader.py", line 106, 
in translate
2018-05-15 16:02:44 --> fields = dict(zip(self.field_definitions.keys(), 
self.field_definitions.keys()))
2018-05-15 16:02:44 -->   File 
"/usr/local/lib/python2.7/dist-packages/invenio/bibfield_reader.py", line 70, 
in field_definitions
2018-05-15 16:02:44 --> return FieldParser.field_definitions()
2018-05-15 16:02:44 -->   File 
"/usr/local/lib/python2.7/dist-packages/invenio/bibfield_config_engine.py", 
line 274, in field_definitions
2018-05-15 16:02:44 --> cls.reparse()
2018-05-15 16:02:44 -->   File 
"/usr/local/lib/python2.7/dist-packages/invenio/bibfield_config_engine.py", 
line 287, in reparse
2018-05-15 16:02:44 --> cls()._create()
2018-05-15 16:02:44 -->   File 
"/usr/local/lib/python2.7/dist-packages/invenio/bibfield_config_engine.py", 
line 341, in _create
2018-05-15 16:02:44 --> self.__resolve_extend_rules()
2018-05-15 16:02:44 -->   File 
"/usr/local/lib/python2.7/dist-packages/invenio/bibfield_config_engine.py", 
line 619, in __resolve_extend_rules
2018-05-15 16:02:44 --> self._create_rule(rule, extend=True)
2018-05-15 16:02:44 -->   File 
"/usr/local/lib/python2.7/dist-packages/invenio/bibfield_config_engine.py", 
line 381, in _create_rule
2018-05-15 16:02:44 --> % (rule.json_id[0],))
2018-05-15 16:02:44 --> Exiting.


sudo -u www-data /opt/invenio/bin/bibencode --mode=daemon

OSError: [Errno 2] No such file or directory:

Thanks in advance, 
Rita