[EP-tech] undefined value error
alan.stiles at open.ac.uk
Thu Dec 3 11:43:21 GMT 2015
Has anyone seen / solved an issue like this?
I'm building a command-line routine (in 3.3.10) to update a new field on eprints. The field exists in the dataset, as seen in MySQL workbench.
It works fine for most of the eprints I'm updating, but some of them cause the routine to fail with the following message:
Can't call method "current_repository" on an undefined value at /opt/eprints3/perl_lib/EPrints/BackCompatibility.pm line 443.
My raft of debug statements have narrowed it down to a call to $eprint->commit;
my $eprint = $repository->eprint($eprint_id);
$eprint->set_value ("new_field_name", "a value");
print STDERR "debug 4, ".$eprint->get_value("new_field_name").", ";
print STDERR "debug 5\n";
And the output on STDERR is
debug 4, a value, Can't call method "current_repository" on an undefined value at /opt/eprints3/perl_lib/EPrints/BackCompatibility.pm line 443.
Any clues? This is on a dev server, so something might be missing from another table? Everything looks the same in the eprints table as records that worked.
-- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). The Open University is authorised and regulated by the Financial Conduct Authority.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Eprints-tech