[Koha] Koha - Trouble loading patron files NOT solved

MJ Ray mjr at phonecoop.coop
Tue Nov 9 15:54:38 NZDT 2010


> The error in the /var/log/koha/koha-error_log is
> import_borrowers.pl: Use of uninitialized value within @columns in 
> pattern match (m//) at 
> /usr/share/koha/intranet/cgi-bin/tools/import_borrowers.pl line 158
> 
> Here are those lines from import_borrowers.pl (hopefully with some context):
> 144 my @columns = $csv->fields();
> 145 if (! $status) {
> 146 push @missing_criticals, {badparse=>1, line=>$., lineraw=>$borrower 
> line};
> 147 } elsif (@columns == @columnkeys) {
> 148 @borrower{@columnkeys} = @columns;
> 149 # MJR: try to fill blanks gracefully by using default values
> 150 foreach my $key (@criticals) {
> 151 if ($borrower{$key} !~ /\S/) {
> 152 $borrower{$key} = $defaults{$key};
> 153 }
> 154 }
> 155 } else {
> 156 # MJR: try to recover gracefully by using default values
> 157 foreach my $key (@columnkeys) {
> 158 if (defined($csvkeycol{$key}) and $columns[$csvkeycol{$key}] =~ /\S/) {
> 159 $borrower{$key} = $columns[$csvkeycol{$key}];

So I think that error means that either @columns contains an undefined
value, or that $csvkeycol{$key} isn't defined but we test that it is
so that shouldn't be the problem.  How can @columns contain an
undefined value?  Maybe if a line doesn't have enough fields?

Right now I'd be checking that CSV file very very closely.

Sorry I can't offer more help yet,
-- 
MJ Ray (slef), member of www.software.coop, a for-more-than-profit co-op.
Past Koha Release Manager (2.0), LMS programmer, statistician, webmaster.
In My Opinion Only: see http://mjr.towers.org.uk/email.html
Available for hire for Koha work http://www.software.coop/products/koha


More information about the Koha mailing list