Webservice::Intermine package error

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Webservice::Intermine package error

JD Wong
Hi dev,

I am running a basic script using webservice::intermine package and have this error:

Use of uninitialized value $_[0] in concatenation (.) or string at native delegation method Webservice::InterMine::Parser::JSON::add_to_header (append) of attribute header (defined at ....perl-5.15.2/lib/site_perl/5.15.2/Webservice/InterMine/Parser/JSON.pm line 64) line 10, <GEN4> line 17.

Haven't been able to get over this one, bug perhaps?

My code:

use strict;
use Webservice::InterMine 'http://flymine.org/query';

my $query = Webservice::InterMine->new_query(class => 'Gene');

$query->add_views(qw/symbol/);

while (my $gene = <$query>) {
# print $gene->symbol, map {$_->name} $gene->proteins, "\n";
}

Thanks,
-JD

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Webservice::Intermine package error

Alex Kalderimis
Well, that's not a terribly helpful error, but really that's an issue
with our server set-up (sorry - for details see below).

I have edited your script so that it runs - see the version below, with
comments:

 use strict;
 use warnings;
 use feature ':5.10';

 # Use www.flymine.org, not flymine.org
 use Webservice::InterMine 'www.flymine.org/query';

 # You do not have to use fully qualified calls, unless you want to.
 my $query = new_query(class => 'Gene');

 # You must specify everything you want back
 $query->add_views(qw/symbol proteins.name/);

 # Normal iteration returns ResultRows, which support
 # hash and array-ref like access. For actual objects see below.
 # Each row will contain one gene symbol, and one protein name.
 while (my $row = <$query>) {
     say @$row;
 }

 # For more object-y access:
 # Also - probably a good idea to limit the size, as
 # Otherwise you will pull down a lot of genes!
 my $iterator = $query->results_iterator(
        as => "jsonobjects", json => "inflate", size => 100);

 while (my $gene = <$iterator>) {
   say $gene->symbol, map {$_->name} @{$gene->proteins};
 }

For details on retrieving results see:
http://search.cpan.org/perldoc?Webservice::InterMine::Query::Roles::Runnable
http://search.cpan.org/perldoc?Webservice::InterMine::Query::ResultObject

All best

Alex

ps. Server set up:
 Flymine is served at www.flymine.org, and we redirect flymine.org
 to www.flymine.org for website equivalence. This unfortunately means
 that depending on the cleverness of your library (and the results
 reading uses a very low level implementation so as to save memory
 when reading large result sets) you may not be redirected - or rather,
 you weren't being redirected, and were receiving a response that could
 not be parsed as a result-set.

pps. Just a note: how is it that you are running perl 5.15? Odd numbered
 releases are dev releases - the most recent stable is 5.14. I know the
 modules do pass tests on dev perls but, obviously, results are not
 guaranteed.

On Wed, 2011-11-16 at 15:37 -0500, JD Wong wrote:

> Hi dev,
>
> I am running a basic script using webservice::intermine package and have
> this error:
>
> Use of uninitialized value $_[0] in concatenation (.) or string at native
> delegation method Webservice::InterMine::Parser::JSON::add_to_header
> (append) of attribute header (defined at
> ....perl-5.15.2/lib/site_perl/5.15.2/Webservice/InterMine/Parser/JSON.pm
> line 64) line 10, <GEN4> line 17.
>
> Haven't been able to get over this one, bug perhaps?
>
> My code:
>
> use strict;
> use Webservice::InterMine 'http://flymine.org/query';
>
> my $query = Webservice::InterMine->new_query(class => 'Gene');
>
> $query->add_views(qw/symbol/);
>
> while (my $gene = <$query>) {
> # print $gene->symbol, map {$_->name} $gene->proteins, "\n";
> }
>
> Thanks,
> -JD
> _______________________________________________
> dev mailing list
> [hidden email]
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev



_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Webservice::Intermine package error

Alex Kalderimis
I have added some better documentation of result processing, which
should be available as 0.9818, and will attend to this further in the
future. Note also the short-cut result format specifications for
results: "rr", "ro", and "objects".

http://search.cpan.org/perldoc?Webservice::InterMine::Query::Roles::Runnable

Alex

On Wed, 2011-11-16 at 23:09 +0000, Alex Kalderimis wrote:

> Well, that's not a terribly helpful error, but really that's an issue
> with our server set-up (sorry - for details see below).
>
> I have edited your script so that it runs - see the version below, with
> comments:
>
>  use strict;
>  use warnings;
>  use feature ':5.10';
>
>  # Use www.flymine.org, not flymine.org
>  use Webservice::InterMine 'www.flymine.org/query';
>
>  # You do not have to use fully qualified calls, unless you want to.
>  my $query = new_query(class => 'Gene');
>
>  # You must specify everything you want back
>  $query->add_views(qw/symbol proteins.name/);
>
>  # Normal iteration returns ResultRows, which support
>  # hash and array-ref like access. For actual objects see below.
>  # Each row will contain one gene symbol, and one protein name.
>  while (my $row = <$query>) {
>      say @$row;
>  }
>
>  # For more object-y access:
>  # Also - probably a good idea to limit the size, as
>  # Otherwise you will pull down a lot of genes!
>  my $iterator = $query->results_iterator(
> as => "jsonobjects", json => "inflate", size => 100);
>
>  while (my $gene = <$iterator>) {
>    say $gene->symbol, map {$_->name} @{$gene->proteins};
>  }
>
> For details on retrieving results see:
> http://search.cpan.org/perldoc?Webservice::InterMine::Query::Roles::Runnable
> http://search.cpan.org/perldoc?Webservice::InterMine::Query::ResultObject
>
> All best
>
> Alex
>
> ps. Server set up:
>  Flymine is served at www.flymine.org, and we redirect flymine.org
>  to www.flymine.org for website equivalence. This unfortunately means
>  that depending on the cleverness of your library (and the results
>  reading uses a very low level implementation so as to save memory
>  when reading large result sets) you may not be redirected - or rather,
>  you weren't being redirected, and were receiving a response that could
>  not be parsed as a result-set.
>
> pps. Just a note: how is it that you are running perl 5.15? Odd numbered
>  releases are dev releases - the most recent stable is 5.14. I know the
>  modules do pass tests on dev perls but, obviously, results are not
>  guaranteed.
>
> On Wed, 2011-11-16 at 15:37 -0500, JD Wong wrote:
> > Hi dev,
> >
> > I am running a basic script using webservice::intermine package and have
> > this error:
> >
> > Use of uninitialized value $_[0] in concatenation (.) or string at native
> > delegation method Webservice::InterMine::Parser::JSON::add_to_header
> > (append) of attribute header (defined at
> > ....perl-5.15.2/lib/site_perl/5.15.2/Webservice/InterMine/Parser/JSON.pm
> > line 64) line 10, <GEN4> line 17.
> >
> > Haven't been able to get over this one, bug perhaps?
> >
> > My code:
> >
> > use strict;
> > use Webservice::InterMine 'http://flymine.org/query';
> >
> > my $query = Webservice::InterMine->new_query(class => 'Gene');
> >
> > $query->add_views(qw/symbol/);
> >
> > while (my $gene = <$query>) {
> > # print $gene->symbol, map {$_->name} $gene->proteins, "\n";
> > }
> >
> > Thanks,
> > -JD
> > _______________________________________________
> > dev mailing list
> > [hidden email]
> > http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>
>
>
> _______________________________________________
> dev mailing list
> [hidden email]
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev



_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Webservice::Intermine package error

Alex Kalderimis
I have added a fix to the perl modules that allow the requests to follow
redirection chains - at least those used by flymine. See the tests in
t/10_acceptance/06_redirection.t for examples.

This fix is released in 0.9819

Alex

On Wed, 2011-11-16 at 23:59 +0000, Alex Kalderimis wrote:

> I have added some better documentation of result processing, which
> should be available as 0.9818, and will attend to this further in the
> future. Note also the short-cut result format specifications for
> results: "rr", "ro", and "objects".
>
> http://search.cpan.org/perldoc?Webservice::InterMine::Query::Roles::Runnable
>
> Alex
>
> On Wed, 2011-11-16 at 23:09 +0000, Alex Kalderimis wrote:
> > Well, that's not a terribly helpful error, but really that's an issue
> > with our server set-up (sorry - for details see below).
> >
> > I have edited your script so that it runs - see the version below, with
> > comments:
> >
> >  use strict;
> >  use warnings;
> >  use feature ':5.10';
> >
> >  # Use www.flymine.org, not flymine.org
> >  use Webservice::InterMine 'www.flymine.org/query';
> >
> >  # You do not have to use fully qualified calls, unless you want to.
> >  my $query = new_query(class => 'Gene');
> >
> >  # You must specify everything you want back
> >  $query->add_views(qw/symbol proteins.name/);
> >
> >  # Normal iteration returns ResultRows, which support
> >  # hash and array-ref like access. For actual objects see below.
> >  # Each row will contain one gene symbol, and one protein name.
> >  while (my $row = <$query>) {
> >      say @$row;
> >  }
> >
> >  # For more object-y access:
> >  # Also - probably a good idea to limit the size, as
> >  # Otherwise you will pull down a lot of genes!
> >  my $iterator = $query->results_iterator(
> > as => "jsonobjects", json => "inflate", size => 100);
> >
> >  while (my $gene = <$iterator>) {
> >    say $gene->symbol, map {$_->name} @{$gene->proteins};
> >  }
> >
> > For details on retrieving results see:
> > http://search.cpan.org/perldoc?Webservice::InterMine::Query::Roles::Runnable
> > http://search.cpan.org/perldoc?Webservice::InterMine::Query::ResultObject
> >
> > All best
> >
> > Alex
> >
> > ps. Server set up:
> >  Flymine is served at www.flymine.org, and we redirect flymine.org
> >  to www.flymine.org for website equivalence. This unfortunately means
> >  that depending on the cleverness of your library (and the results
> >  reading uses a very low level implementation so as to save memory
> >  when reading large result sets) you may not be redirected - or rather,
> >  you weren't being redirected, and were receiving a response that could
> >  not be parsed as a result-set.
> >
> > pps. Just a note: how is it that you are running perl 5.15? Odd numbered
> >  releases are dev releases - the most recent stable is 5.14. I know the
> >  modules do pass tests on dev perls but, obviously, results are not
> >  guaranteed.
> >
> > On Wed, 2011-11-16 at 15:37 -0500, JD Wong wrote:
> > > Hi dev,
> > >
> > > I am running a basic script using webservice::intermine package and have
> > > this error:
> > >
> > > Use of uninitialized value $_[0] in concatenation (.) or string at native
> > > delegation method Webservice::InterMine::Parser::JSON::add_to_header
> > > (append) of attribute header (defined at
> > > ....perl-5.15.2/lib/site_perl/5.15.2/Webservice/InterMine/Parser/JSON.pm
> > > line 64) line 10, <GEN4> line 17.
> > >
> > > Haven't been able to get over this one, bug perhaps?
> > >
> > > My code:
> > >
> > > use strict;
> > > use Webservice::InterMine 'http://flymine.org/query';
> > >
> > > my $query = Webservice::InterMine->new_query(class => 'Gene');
> > >
> > > $query->add_views(qw/symbol/);
> > >
> > > while (my $gene = <$query>) {
> > > # print $gene->symbol, map {$_->name} $gene->proteins, "\n";
> > > }
> > >
> > > Thanks,
> > > -JD
> > > _______________________________________________
> > > dev mailing list
> > > [hidden email]
> > > http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
> >
> >
> >
> > _______________________________________________
> > dev mailing list
> > [hidden email]
> > http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>
>
>
> _______________________________________________
> dev mailing list
> [hidden email]
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev

--
Alex Kalderimis
Software Developer
InterMine
Cambridge Systems Biology Centre
Tennis Court Road - CB2 1QR
University of Cambridge
[hidden email]


_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Webservice::Intermine package error

JD Wong
In reply to this post by Alex Kalderimis
Thanks Alex, 

I was following the code examples on the wiki and CPAN pages, I don't know how recent it is; but the code from your last message works great!


The perl I'm using is actually obtained through perlbrew, that was the most recent version available when I queried for available perls :P

Cheers,
-JD

On Wed, Nov 16, 2011 at 6:09 PM, Alex Kalderimis <[hidden email]> wrote:
Well, that's not a terribly helpful error, but really that's an issue
with our server set-up (sorry - for details see below).

I have edited your script so that it runs - see the version below, with
comments:

 use strict;
 use warnings;
 use feature ':5.10';

 # Use www.flymine.org, not flymine.org
 use Webservice::InterMine 'www.flymine.org/query';

 # You do not have to use fully qualified calls, unless you want to.
 my $query = new_query(class => 'Gene');

 # You must specify everything you want back
 $query->add_views(qw/symbol proteins.name/);

 # Normal iteration returns ResultRows, which support
 # hash and array-ref like access. For actual objects see below.
 # Each row will contain one gene symbol, and one protein name.
 while (my $row = <$query>) {
    say @$row;
 }

 # For more object-y access:
 # Also - probably a good idea to limit the size, as
 # Otherwise you will pull down a lot of genes!
 my $iterator = $query->results_iterator(
       as => "jsonobjects", json => "inflate", size => 100);

 while (my $gene = <$iterator>) {
  say $gene->symbol, map {$_->name} @{$gene->proteins};
 }

For details on retrieving results see:
http://search.cpan.org/perldoc?Webservice::InterMine::Query::Roles::Runnable
http://search.cpan.org/perldoc?Webservice::InterMine::Query::ResultObject

All best

Alex

ps. Server set up:
 Flymine is served at www.flymine.org, and we redirect flymine.org
 to www.flymine.org for website equivalence. This unfortunately means
 that depending on the cleverness of your library (and the results
 reading uses a very low level implementation so as to save memory
 when reading large result sets) you may not be redirected - or rather,
 you weren't being redirected, and were receiving a response that could
 not be parsed as a result-set.

pps. Just a note: how is it that you are running perl 5.15? Odd numbered
 releases are dev releases - the most recent stable is 5.14. I know the
 modules do pass tests on dev perls but, obviously, results are not
 guaranteed.

On Wed, 2011-11-16 at 15:37 -0500, JD Wong wrote:
> Hi dev,
>
> I am running a basic script using webservice::intermine package and have
> this error:
>
> Use of uninitialized value $_[0] in concatenation (.) or string at native
> delegation method Webservice::InterMine::Parser::JSON::add_to_header
> (append) of attribute header (defined at
> ....perl-5.15.2/lib/site_perl/5.15.2/Webservice/InterMine/Parser/JSON.pm
> line 64) line 10, <GEN4> line 17.
>
> Haven't been able to get over this one, bug perhaps?
>
> My code:
>
> use strict;
> use Webservice::InterMine 'http://flymine.org/query';
>
> my $query = Webservice::InterMine->new_query(class => 'Gene');
>
> $query->add_views(qw/symbol/);
>
> while (my $gene = <$query>) {
> # print $gene->symbol, map {$_->name} $gene->proteins, "\n";
> }
>
> Thanks,
> -JD
> _______________________________________________
> dev mailing list
> [hidden email]
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev




_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Webservice::Intermine package error

Josh Goodman
I would definitely fall back to 5.14 or 5.12.  There is a ticket to
make installing the current stable dist explicit in perlbrew
(https://github.com/gugod/App-perlbrew/issues/32).  Otherwise you have
to be aware of how the perl devs use version numbers and/or crosscheck
perlbrew's list with http://www.cpan.org/src/README.html.  If you want
to know more about perl versions check out
http://www.effectiveperlprogramming.com/blog/1055.

You will have to reinstall all your modules, but that can be easily
handled via https://github.com/gugod/App-perlbrew/wiki/Reinstall-All-Modules-On-New-Perl.

Cheers,
Josh

On Thu, Nov 17, 2011 at 11:23 AM, JD Wong <[hidden email]> wrote:

> Thanks Alex,
> I was following the code examples on the wiki and CPAN pages, I don't know
> how recent it is; but the code from your last message works great!
> I think the link you were looking for regarding the
> resultobject: http://search.cpan.org/~intermine/Webservice-InterMine-0.9818/lib/Webservice/InterMine/ResultObject.pm
> The perl I'm using is actually obtained through perlbrew, that was the most
> recent version available when I queried for available perls :P
> Cheers,
> -JD
>
> On Wed, Nov 16, 2011 at 6:09 PM, Alex Kalderimis <[hidden email]> wrote:
>>
>> Well, that's not a terribly helpful error, but really that's an issue
>> with our server set-up (sorry - for details see below).
>>
>> I have edited your script so that it runs - see the version below, with
>> comments:
>>
>>  use strict;
>>  use warnings;
>>  use feature ':5.10';
>>
>>  # Use www.flymine.org, not flymine.org
>>  use Webservice::InterMine 'www.flymine.org/query';
>>
>>  # You do not have to use fully qualified calls, unless you want to.
>>  my $query = new_query(class => 'Gene');
>>
>>  # You must specify everything you want back
>>  $query->add_views(qw/symbol proteins.name/);
>>
>>  # Normal iteration returns ResultRows, which support
>>  # hash and array-ref like access. For actual objects see below.
>>  # Each row will contain one gene symbol, and one protein name.
>>  while (my $row = <$query>) {
>>     say @$row;
>>  }
>>
>>  # For more object-y access:
>>  # Also - probably a good idea to limit the size, as
>>  # Otherwise you will pull down a lot of genes!
>>  my $iterator = $query->results_iterator(
>>        as => "jsonobjects", json => "inflate", size => 100);
>>
>>  while (my $gene = <$iterator>) {
>>   say $gene->symbol, map {$_->name} @{$gene->proteins};
>>  }
>>
>> For details on retrieving results see:
>>
>> http://search.cpan.org/perldoc?Webservice::InterMine::Query::Roles::Runnable
>> http://search.cpan.org/perldoc?Webservice::InterMine::Query::ResultObject
>>
>> All best
>>
>> Alex
>>
>> ps. Server set up:
>>  Flymine is served at www.flymine.org, and we redirect flymine.org
>>  to www.flymine.org for website equivalence. This unfortunately means
>>  that depending on the cleverness of your library (and the results
>>  reading uses a very low level implementation so as to save memory
>>  when reading large result sets) you may not be redirected - or rather,
>>  you weren't being redirected, and were receiving a response that could
>>  not be parsed as a result-set.
>>
>> pps. Just a note: how is it that you are running perl 5.15? Odd numbered
>>  releases are dev releases - the most recent stable is 5.14. I know the
>>  modules do pass tests on dev perls but, obviously, results are not
>>  guaranteed.
>>
>> On Wed, 2011-11-16 at 15:37 -0500, JD Wong wrote:
>> > Hi dev,
>> >
>> > I am running a basic script using webservice::intermine package and have
>> > this error:
>> >
>> > Use of uninitialized value $_[0] in concatenation (.) or string at
>> > native
>> > delegation method Webservice::InterMine::Parser::JSON::add_to_header
>> > (append) of attribute header (defined at
>> > ....perl-5.15.2/lib/site_perl/5.15.2/Webservice/InterMine/Parser/JSON.pm
>> > line 64) line 10, <GEN4> line 17.
>> >
>> > Haven't been able to get over this one, bug perhaps?
>> >
>> > My code:
>> >
>> > use strict;
>> > use Webservice::InterMine 'http://flymine.org/query';
>> >
>> > my $query = Webservice::InterMine->new_query(class => 'Gene');
>> >
>> > $query->add_views(qw/symbol/);
>> >
>> > while (my $gene = <$query>) {
>> > # print $gene->symbol, map {$_->name} $gene->proteins, "\n";
>> > }
>> >
>> > Thanks,
>> > -JD
>> > _______________________________________________
>> > dev mailing list
>> > [hidden email]
>> > http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> _______________________________________________
> dev mailing list
> [hidden email]
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>
>

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Webservice::Intermine package error

Alex Kalderimis
In reply to this post by Alex Kalderimis
Ok, there is an issue with the Perl modules that means they don't like
non-default ports very much - that has been fixed and will be released
in a few minutes to CPAN. (the python library is fine though...)

However, it seems your webservice is not terribly happy, and it returns
500 errors on query requests (although is handling other stuff such as
the model and version requests well enough). Please look in your logs
and get back to me.

Alex

On Tue, 2011-11-29 at 17:00 -0500, JD Wong wrote:

> http://nutria.bio.indiana.edu:8080/flybasemine/service doesn't work either
>
> On Tue, Nov 29, 2011 at 1:05 PM, JD Wong <[hidden email]> wrote:
>
> > Hi Alex,
> >
> > I switched the URL in your code above to "
> > http://nutria.bio.indiana.edu:8080/flybasemine/query" and got this error:
> >
> > Attribute (version) does not pass the type constraint because: I could not
> > get the version number for this service - please check the url and make
> > sure the service is available at constructor
> > Webservice::InterMine::Service::new (defined at
> > /home/jdmswong/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Webservice/InterMine/Service.pm
> > line 837) line 127
> >  Webservice::InterMine::Service::new('Webservice::InterMine::Service', '
> > http://nutria.bio.indiana.edu:8080/flybasemine/query') called at
> > /home/jdmswong/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Webservice/InterMine.pm
> > line 463
> >  Webservice::InterMine::get_service('Webservice::InterMine', '
> > http://nutria.bio.indiana.edu:8080/flybasemine/query') called at
> > /home/jdmswong/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Webservice/InterMine.pm
> > line 207
> >  Webservice::InterMine::import('Webservice::InterMine', '
> > http://nutria.bio.indiana.edu:8080/flybasemine/query') called at sample.plline 8
> >  main::BEGIN() called at sample.pl line 8
> >  eval {...} called at sample.pl line 8
> > BEGIN failed--compilation aborted at sample.pl line 8.
> >
> > What do you think?
> >
> > Cheers,
> > -JD
> >
> > On Wed, Nov 16, 2011 at 6:09 PM, Alex Kalderimis <[hidden email]> wrote:
> >
> >> Well, that's not a terribly helpful error, but really that's an issue
> >> with our server set-up (sorry - for details see below).
> >>
> >> I have edited your script so that it runs - see the version below, with
> >> comments:
> >>
> >>  use strict;
> >>  use warnings;
> >>  use feature ':5.10';
> >>
> >>  # Use www.flymine.org, not flymine.org
> >>  use Webservice::InterMine 'www.flymine.org/query';
> >>
> >>  # You do not have to use fully qualified calls, unless you want to.
> >>  my $query = new_query(class => 'Gene');
> >>
> >>  # You must specify everything you want back
> >>  $query->add_views(qw/symbol proteins.name/);
> >>
> >>  # Normal iteration returns ResultRows, which support
> >>  # hash and array-ref like access. For actual objects see below.
> >>  # Each row will contain one gene symbol, and one protein name.
> >>  while (my $row = <$query>) {
> >>     say @$row;
> >>  }
> >>
> >>  # For more object-y access:
> >>  # Also - probably a good idea to limit the size, as
> >>  # Otherwise you will pull down a lot of genes!
> >>  my $iterator = $query->results_iterator(
> >>        as => "jsonobjects", json => "inflate", size => 100);
> >>
> >>  while (my $gene = <$iterator>) {
> >>   say $gene->symbol, map {$_->name} @{$gene->proteins};
> >>  }
> >>
> >> For details on retrieving results see:
> >>
> >> http://search.cpan.org/perldoc?Webservice::InterMine::Query::Roles::Runnable
> >> http://search.cpan.org/perldoc?Webservice::InterMine::Query::ResultObject
> >>
> >> All best
> >>
> >> Alex
> >>
> >> ps. Server set up:
> >>  Flymine is served at www.flymine.org, and we redirect flymine.org
> >>  to www.flymine.org for website equivalence. This unfortunately means
> >>  that depending on the cleverness of your library (and the results
> >>  reading uses a very low level implementation so as to save memory
> >>  when reading large result sets) you may not be redirected - or rather,
> >>  you weren't being redirected, and were receiving a response that could
> >>  not be parsed as a result-set.
> >>
> >> pps. Just a note: how is it that you are running perl 5.15? Odd numbered
> >>  releases are dev releases - the most recent stable is 5.14. I know the
> >>  modules do pass tests on dev perls but, obviously, results are not
> >>  guaranteed.
> >>
> >> On Wed, 2011-11-16 at 15:37 -0500, JD Wong wrote:
> >> > Hi dev,
> >> >
> >> > I am running a basic script using webservice::intermine package and have
> >> > this error:
> >> >
> >> > Use of uninitialized value $_[0] in concatenation (.) or string at
> >> native
> >> > delegation method Webservice::InterMine::Parser::JSON::add_to_header
> >> > (append) of attribute header (defined at
> >> > ....perl-5.15.2/lib/site_perl/5.15.2/Webservice/InterMine/Parser/JSON.pm
> >> > line 64) line 10, <GEN4> line 17.
> >> >
> >> > Haven't been able to get over this one, bug perhaps?
> >> >
> >> > My code:
> >> >
> >> > use strict;
> >> > use Webservice::InterMine 'http://flymine.org/query';
> >> >
> >> > my $query = Webservice::InterMine->new_query(class => 'Gene');
> >> >
> >> > $query->add_views(qw/symbol/);
> >> >
> >> > while (my $gene = <$query>) {
> >> > # print $gene->symbol, map {$_->name} $gene->proteins, "\n";
> >> > }
> >> >
> >> > Thanks,
> >> > -JD
> >> > _______________________________________________
> >> > dev mailing list
> >> > [hidden email]
> >> > http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
> >>
> >>
> >>
> >



_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev