edsu / pymarc

process MARC records from Python
http://python.org/pypi/pymarc
Other
252 stars 98 forks source link

MARCMaker exception #103

Closed edsu closed 7 years ago

edsu commented 7 years ago

If you try to load a MARC record in MARCMaker format you get an obscure exception:

Traceback (most recent call last):
  File "test.py", line 4, in <module>
    for record in reader:
  File "/usr/local/lib/python2.7/site-packages/six.py", line 558, in next
    return type(self).__next__(self)
  File "/Users/ed/Projects/pymarc/pymarc/reader.py", line 90, in __next__
    length = int(first5)
ValueError: invalid literal for int() with base 10: '=LDR '

Something a bit more descriptive would be useful! pymarc does not support reading records in this format.

edsu commented 7 years ago

Fixed in [7741c4de01c23b363cf6161750865d37cdee3e72]