Opened 4 years ago

#110 new enhancement

BibConvert: improve template checking and error reporting

Reported by: jcaffaro Owned by:
Priority: minor Milestone:
Component: BibConvert Version: v0.99.1
Keywords: Cc: Jocelyne.Jerdelet@…


BibConvert fails miserably when templates cannot be parsed. For eg. a missing '-' separator in a source template rule will crash BibConvert:

===   data source configuration template   ===

leads to:

Traceback (most recent call last):
  File "/opt/cds-invenio/bin/bibconvert", line 306, in ?
  File "/usr/lib64/python2.4/site-packages/invenio/", line 2072, in convert
    record = create_record(begin_record_header, ending_record_footer, query_string, match_mode, Xcount)
  File "/usr/lib64/python2.4/site-packages/invenio/", line 1941, in create_record
    DATA = get_subfields(DATA, subfield, SRC_TPL)
  File "/usr/lib64/python2.4/site-packages/invenio/", line 221, in get_subfields
    data_item_split = data_item.split(sep, 1)
ValueError: empty separator

Template checking should be improved, and meaningful warnings should be produced

Change History (0)

Note: See TracTickets for help on using tickets.