Opened 3 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@… |
Description
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 === 773cb--<:773c> [...]
leads to:
Traceback (most recent call last):
File "/opt/cds-invenio/bin/bibconvert", line 306, in ?
bibconvert.convert(ar_)
File "/usr/lib64/python2.4/site-packages/invenio/bibconvert.py", 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/bibconvert.py", line 1941, in create_record
DATA = get_subfields(DATA, subfield, SRC_TPL)
File "/usr/lib64/python2.4/site-packages/invenio/bibconvert.py", 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
Note: See
TracTickets for help on using
tickets.
