[Koha-bugs] [Bug 1372] Importing invalid MARC records crashes importer (2.2.8)
bugzilla-daemon at pippin.metavore.com
bugzilla-daemon at pippin.metavore.com
Tue Nov 27 15:26:09 CET 2007
http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1372
------- Comment #6 from sanyok_ko at mail.ru 2007-11-27 06:26 -------
I had the same problem with another MARC file. The file looks clean (no errors
from 'marcdump' tool), but import doesn't work.
I removed all CR, LF symbols from it, and the file imported with no errors.
I think, the error is in subroutine ImportBreeding (Breeding.pm) at this line
my @marcarray = split /\x1D/, $marcrecords;
It produce array of malformed records with CR,LF symbols at beginning of each
record, like this:
marc_rec0
CR,LF marc_rec1
CR,LF marc_rec2
And MARC::File::USMARC::decode can't parse this records.
my $marcrecord = MARC::File::USMARC::decode($marcarray[$i]."\x1D");
Koha version: 2.2.9
OS version: 2.6.11-1.1369_FC4smp
Perl version: 5.008006
MySQL version: mysql Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i386)
using readline 4.3
Apache version: Apache/2.0.54
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the Koha-bugs
mailing list