edsu / pymarc

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

Unable to read marc21 file exported from NewGenLib #71

Open acorbi opened 9 years ago

acorbi commented 9 years ago

I take a file exported from NextGenLib (http://verussolutions.biz/web/content/download) software which contains around 1500 records in MARC21 format. When i try to open it using pymarc 3.0.3 following error gets thrown:

Traceback (most recent call last): File "convert_marc21_records.py", line 18, in for record in reader: File "/Users/alexcorbi/Developing/ODC/venv/lib/python2.7/site-packages/six.py", line 530, in next return type(self).next(self) File "/Users/alexcorbi/Developing/ODC/venv/lib/python2.7/site-packages/pymarc/reader.py", line 97, in next utf8_handling=self.utf8_handling) File "/Users/alexcorbi/Developing/ODC/venv/lib/python2.7/site-packages/pymarc/record.py", line 72, in init utf8_handling=utf8_handling) File "/Users/alexcorbi/Developing/ODC/venv/lib/python2.7/site-packages/pymarc/record.py", line 321, in decode_marc raise NoFieldsFound pymarc.exceptions.NoFieldsFound: Unable to locate fields in record data

However if i try the sample files provided with the library, they get read properly. Is there any difference between MARC21 files?

edsu commented 9 years ago

Can you export one record and make it available somehow?