EPrints Technical Mailing List Archive

Message: #02394


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

[EP-tech] Re: irstats2 on 3.3.7


Hold on, let's focus on your first error ie "Attempt to get value...":

You get (according to the stack trace you copied/pasted to github):

> EPrints::DataObj::get_value('EPrints::DataObj::EPrint=HASH(0x6d11098)', undef)

in the context of the code it's running:

> $eprint->get_value( undef );

"undef" is returned by the line above (Plugin/Stats/Sets.pm L243):

> my $fieldname = $self->get_fieldname( $set ); # where $set == 'type'

So $fieldname is undef so $self->get_fieldname( $set ) returned undef.

On L242 could you add the following code and tell me what gets printed please?

<code>
if( $set eq 'type' )
{
    use Data::Dumper;
    print STDERR Dumper( $self->{sets} )."\n\n";
}
</code>

Then it should abort anyway.

Thank you,
Seb.


On 13/11/13 11:25, raffaele messuti wrote:
Sebastien Francois wrote:
Where did you get irstats2 from? If it's the current version which is on 
github you don't need to apply any patches.
i cloned the git repository and installed the files manually (without epm).

using the default Handler.pm::create_table()[1] i got:

Can't call method "clone" on an undefined value at
/almadl/campus/eprints/archives/campus/bin/stats/../../../../perl_lib/EPrints/Database.pm
line 874, <DATA> line 960.

commenting out 1211-1214[2] instead creates irstats_* tables
but stops at:

------------------------------------------------------------------
---------------- EPrints System Error ----------------------------
------------------------------------------------------------------
Attempt to get value from not existent field: archive/
------------------------------------------------------------------


Can you copy/paste your config here please (cfg.d/z_irstats2.pl)?
i'm testing using the vanilla cfg.d/z_irstats2.pl without any modification

thank you.

--
raffaele


[1]
https://github.com/eprints/irstats2/blob/master/cfg/plugins/EPrints/Plugin/Stats/Handler.pm#L1199

[2]
https://github.com/eprints/irstats2/blob/master/cfg/plugins/EPrints/Plugin/Stats/Handler.pm#L1211-L1214
*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/