Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

BibConvert: improve template checking and error reporting #110

Closed
jeromecaffaro opened this Issue · 1 comment

2 participants

@jeromecaffaro
Collaborator

Originally on 2010-06-07

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

@tiborsimko tiborsimko added maint-0.99 and removed v0.99.1 labels
@tiborsimko
Owner

As per Deposit in next, we can close this issue.

@tiborsimko tiborsimko closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.