[BioRuby] biofetch confusion
Toshiaki Katayama
ktym at hgc.jp
Tue Sep 30 02:47:45 UTC 2008
Hi,
> Should bioruby add the http:// somehow?
I don't think so. Please add protocol prefix by yourself.
Toshiaki
On 2008/09/30, at 11:40, Ben Woodcroft wrote:
> Hi,
>
> I was running a fetch from within ruby using the alternate server, and ran
> into a problem it took stupid me a little while to figure out. Thought I
> might post to help others.
>
>>> pdb = Bio::Fetch.new('www.ebi.ac.uk/cgi-bin/dbfetch').fetch('pdb','2A06')
> NoMethodError: You have a nil object when you didn't expect it!
> The error occurred while evaluating nil.downcase
> from /usr/lib/ruby/1.8/open-uri.rb:551:in `find_proxy'
> from /usr/lib/ruby/1.8/open-uri.rb:147:in `open_loop'
> from /usr/lib/ruby/1.8/open-uri.rb:164:in `call'
> from /usr/lib/ruby/1.8/open-uri.rb:164:in `open_loop'
> from /usr/lib/ruby/1.8/open-uri.rb:162:in `catch'
> from /usr/lib/ruby/1.8/open-uri.rb:162:in `open_loop'
> from /usr/lib/ruby/1.8/open-uri.rb:132:in `open_uri'
> from /home/ben/forays/bioruby_wwood/lib/bio/command.rb:223:in `read_uri'
> from /home/ben/forays/bioruby_wwood/lib/bio/io/fetch.rb:109:in `fetch'
> from (irb):5
>
>
> Same problem happens when you use the br_biofetch.rb script directly.
>
>
> The problem was fixed by adding 'http://' to the front of the url:
>
>>> pdb = Bio::Fetch.new('http://www.ebi.ac.uk/cgi-bin/dbfetch').fetch('pdb
> ','2A06')
> ... pdb printed here ...
>
>
> Should bioruby add the http:// somehow?
>
> Thanks,
> ben
>
> --
> FYI: My email addresses at unimelb, uq and gmail all redirect to the same
> place.
> _______________________________________________
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby
More information about the BioRuby
mailing list