EPrints Technical Mailing List Archive

Message: #06284


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] Another import thing!


Add the following code and run it again – let us know what the output is:

 

                unless( ref($value) =~ m/^HASH/ ) {

 

                                use Data::Dumper;

                                print STDERR Dumper $value;

 

                                EPrints::abort( "EPrints::MetaField::Name::ordervalue_basic called on something other than a hash." );

                }

 

Also, run the export with –verbose, it may well tell you which record it’s exporting when it aborts. 

 

 

isc

Adam Field
SHERPA services analyst developer

 

 

From: <eprints-tech-bounces@ecs.soton.ac.uk> on behalf of Andrew Beeken <anbeeken@lincoln.ac.uk>
Reply-To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
Date: Monday, 13 February 2017 14:48
To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
Subject: [EP-tech] Another import thing!

 

Hello all!

 

Despite what it may look like I AM making SOME progress with my import work at this end. I’ve managed to consolidate our users from the two table structure that we have in place so that we can get them all in and start generating the relevant pages. I have, however, found a new issue on importing records which MIGHT have fixed the issue I was reporting before – I can’t confirm this, however, as this new error is bailing the import function entirely.

 

So, I re-ran the whole export from our live repository to be met with an error which indicated I needed to bring across a function in MetaField/Name.pm which pertained to a change that was put in by EPrints Services back in 2011 (as documented in the comments for our AuthorID.pm which I’d previously brought in) Reintroducing this seemed to let the import run without a hitch until it hit a specific record and generated the error:

 

EPrints::MetaField::Name::ordervalue_basic called on something other than a hash.

 

Looking at the Name.pm file, the function that generates this is as follows:

 

sub ordervalue_basic

{

                my( $self , $value ) = @_;

 

                unless( ref($value) =~ m/^HASH/ ) {

                                EPrints::abort( "EPrints::MetaField::Name::ordervalue_basic called on something other than a hash." );

                }

 

                my @a;

                foreach( "family", "lineage", "given", "honourific" )

                {

                                if( defined $value->{$_} )

                                {

                                                push @a, $value->{$_};

                                }

                                else

                                {

                                                push @a, "";

                                }

                }

                return join( "\t" , @a );

}

 

However I’m not entirely sure what it’s supposed to be doing (other than perhaps ordering authors by their name?) or why it threw the error – it was around 1350 records into the import when the error through so clearly earlier records were a-ok. Any thoughts as to how I can crack this open and figure out what it’s failing on?

 

Cheers!

Andrew


The University of Lincoln, located in the heart of the city of Lincoln, has established an international reputation based on high student satisfaction, excellent graduate employment and world-class research.


The information in this e-mail and any attachments may be confidential. If you have received this email in error please notify the sender immediately and remove it from your system. Do not disclose the contents to another person or take copies.

Email is not secure and may contain viruses. The University of Lincoln makes every effort to ensure email is sent without viruses, but cannot guarantee this and recommends recipients take appropriate precautions.

The University may monitor email traffic data and content in accordance with its policies and English law. Further information can be found at: http://www.lincoln.ac.uk/legal.


Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800.

Jisc Services Limited is a wholly owned Jisc subsidiary and a company limited by guarantee which is registered in England under company number 2881024, VAT number GB 197 0632 86. The registered office is: One Castle Park, Tower Hill, Bristol BS2 0JA. T 0203 697 5800.