Closed nflorin closed 3 years ago
Error mostly occurs in 040 (cataloging source) lines, because of OCLC codes like "CQ$".
Fixed. Fixed 040 line handling, issue is optionally logged as warning in other fields. Also on RecursionError, __getattr__
informs of the bad attribute asked for.
When the field is being converted into a dict it breaks the string on dollar signs, leading to a "subfield" without a subfield indicator, causing an IndexError and crash. This is also likely to happen with a line that ends with a dollar sign.
A (shortened) example field, with the "$$d":
=040 \\$aNLM$beng$cNLM$dNSD$dIUL$dDLC$dCQ$$dLND$dOCLCQ$dL2U$dOCLCQ$dCPO$dDLC$dCN4X3