[Koha] Koha - Trouble loading patron files solved
Linda Culberson
lculber at mdah.state.ms.us
Sat Nov 6 05:25:38 NZDT 2010
I think I've got it now. It seems that it didn't like the single
quotes in the header nor the double quotes in the patron-attributes field
On 1:59 PM, Linda Culberson wrote:
> I'm having trouble bulk loading patrons files into Koha 3.2. I used
> the same file I used in 3.1 with no success, so I did one manually,
> and then set everything to match that. I got the same errors in 3.2.
> both times:
> In the staff client, I get that the record was " not imported because
> they are not in the expected format" and then
> Critical field "surname" missing (borrowernumber: UNDEF; surname: UNDEF).
> I have headerrow copied from the "Import Patrons" page:
> 'surname', 'firstname', 'title', 'othernames', 'initials',
> 'streetnumber', 'streettype', 'address', 'address2', 'city',
> 'zipcode', 'country', 'email', 'phone', 'mobile', 'fax', 'emailpro',
> 'phonepro', 'B_streetnumber', 'B_streettype', 'B_address',
> 'B_address2', 'B_city', 'B_zipcode', 'B_country', 'B_email',
> 'B_phone', 'dateofbirth', 'branchcode', 'categorycode',
> 'dateenrolled', 'dateexpiry', 'gonenoaddress', 'lost', 'debarred',
> 'contactname', 'contactfirstname', 'contacttitle', 'guarantorid',
> 'borrowernotes', 'relationship', 'ethnicity', 'ethnotes', 'sex',
> 'password', 'flags', 'userid', 'opacnote', 'contactnote', 'sort1',
> 'sort2', 'altcontactfirstname', 'altcontactsurname',
> 'altcontactaddress1', 'altcontactaddress2', 'altcontactaddress3',
> 'altcontactzipcode', 'altcontactcountry', 'altcontactphone',
> 'smsalertnumber', 'privacy', 'patron_attributes'
> My record is:
> 'Crawford', 'Taz', '', 'Tazmo', '', '', '', '150 Our Street', '',
> 'Yazoo City, MS', '39194', '', '', '', '', '', '', '', '', '', '', '',
> '', '', '', '', '', '', 'DAH', '01', '11/05/2010', '11/05/2011', '',
> '', '', '', '', '', '', '', '', '', '', '', 'Tazmo', '', '11111', '',
> '', '', '', '', '', '', '', '', '', '', '', '', '1',
> 'CountyCode:yz,PhotoID:Tx VetId 0042201,StateCode:01'
>
> In the /var/log/koha/koha-error_log
> [Fri Nov 05 09:56:43 2010] [error] [client 10.8.5.33] [Fri Nov 5
> 09:56:43 2010] import_borrowers.pl: Use of uninitialized value $keycol
> in substitution (s///) at
> /usr/share/koha/intranet/cgi-bin/tools/import_borrowers.pl line 124,
> <fh00001mytest.csv> line 1., referer:
> http://koha.mdah.state.ms.us:8080/cgi-bin/koha/tools/import_borrowers.pl
> [Fri Nov 05 09:56:43 2010] [error] [client 10.8.5.33] [Fri Nov 5
> 09:56:43 2010] import_borrowers.pl: Use of uninitialized value $keycol
> in hash element at
> /usr/share/koha/intranet/cgi-bin/tools/import_borrowers.pl line 125,
> <fh00001mytest.csv> line 1., referer:
> http://koha.mdah.state.ms.us:8080/cgi-bin/koha/tools/import_borrowers.pl
> [Fri Nov 05 09:56:43 2010] [error] [client 10.8.5.33] [Fri Nov 5
> 09:56:43 2010] import_borrowers.pl: Use of uninitialized value
> $csvcolumns[0] in join or string at
> /usr/share/koha/intranet/cgi-bin/tools/import_borrowers.pl line 133,
> <fh00001mytest.csv> line 1., referer:
> http://koha.mdah.state.ms.us:8080/cgi-bin/koha/tools/import_borrowers.pl
>
> So I looked at import_borrowers.pl and those lines are
> 122 foreach my $keycol (@csvcolumns) {
> 123 # columnkeys don't contain whitespace, but some stupid
> tools add it
> 124 $keycol =~ s/ +//g;
> 125 $csvkeycol{$keycol} = $col++;
> 126 }
> 127 #warn($borrowerline);
> 128 my $ext_preserve = $input->param('ext_preserve') || 0;
> 129 if ($extended) {
> 130 $matchpoint_attr_type =
> C4::Members::AttributeTypes->fetch($matchpoint);
> 131 }
> 132
> 133 push @feedback, {feedback=>1, name=>'headerrow',
> value=>join(', ', @csvcolumns)};
>
> Any help would be appreciated.
>
--
Linda Culberson lculber at mdah.state.ms.us
Archives and Records Services Division
Ms. Dept. of Archives& History
P. O. Box 571
Jackson, MS 39205-0571
Telephone: 601/576-6873
Facsimile: 601/576-6824
More information about the Koha
mailing list