[Biopython-dev] TogoWS test failure, was: Compiling Biopython on 64 bit Windows
Peter Cock
p.j.a.cock at googlemail.com
Fri Apr 18 20:24:53 UTC 2014
Thanks Lenna,
Strange - although I was sure it was working perfectly on Linux
at work this afternoon, I can reproduce this as well now.
This commit adds a more informative error message:
https://github.com/biopython/biopython/commit/e5c656e7ce7496db0291f0055da61c492c5054aa
e.g.
ValueError: Expected an integer from URL
http://togows.dbcls.jp/search/pubmed/TogoWS/count, got: '<!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<html
xmlns="http://www.w3.org/1999/xhtml">\n<head>\n <meta
http-equiv="Content-Type" content="text/html; charset=UTF-8"
/>\n</head>\n<body>\n<div>1</div>\n\n</body>\n</html>\n'
i.e. Rather than plain text, it is HTML with the value
inside a <div> tag. This may be a content negotiation
problem, but I will raise this with the TogoWS team.
Manlio - we can ignore this for now for 64 bit Windows
testing,
Thanks,
Peter
On Fri, Apr 18, 2014 at 7:53 PM, Lenna Peterson <arklenna at gmail.com> wrote:
> I see similar errors (Ubuntu 12.04, Python 2.7.3, university network).
>
> I can test whether the same thing happens while I'm off-campus.
>
> Lenna
>
>
> On Fri, Apr 18, 2014 at 2:26 PM, Peter Cock <p.j.a.cock at googlemail.com>
> wrote:
>>
>> On Thu, Apr 17, 2014 at 7:57 AM, Manlio Calvi <manlio.calvi at gmail.com>
>> wrote:
>> > Update from the first round of fights :)
>> >
>>
>> Following a successful build (the emails didn't get CC'd to
>> the list - can we forward them?), Manlio reported some test
>> failures including with TogoWS (both Python 2.7 and 3.4),
>> pasted at the end of this email.
>>
>> Something is amiss in the call to Bio.TogoWS.search_count(...)
>> where we expect TogoWS to return a plain text file with an
>> integer count in it.
>>
>> Somehow some XHTML is being returned instead.
>>
>> Has anyone else seen this before? I wonder if it is a proxy
>> problem or something like that?
>>
>> Thanks,
>>
>> Peter
>>
>> --
>>
>>
>> ======================================================================
>> ERROR: test_pubmed_search_bioruby (test_TogoWS.TogoSearch)
>> Bio.TogoWS.search_iter("pubmed", "BioRuby") etc
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>> File "C:\Users\Public\BioPython3\biopython\Tests\test_TogoWS.py",
>> line 425, in test_pubmed_search_bioruby
>> "20739307", "20015970", "14693808"])
>> File "C:\Users\Public\BioPython3\biopython\Tests\test_TogoWS.py",
>> line 463, in check
>> search_count = TogoWS.search_count(database, search_term)
>> File
>> "C:\Users\Public\BioPython3\biopython\build\lib.win-amd64-3.4\Bio\TogoWS\__init__.py",
>> line 167, in search_count
>> count = int(handle.read().strip())
>> ValueError: invalid literal for int() with base 10: '<!DOCTYPE html
>> PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<html
>> xmlns="http://www.w3.org/1999/xhtml">\n<head>\n <meta
>> http-equiv="Content-Type" c
>>
>> ======================================================================
>> ERROR: test_pubmed_search_porin (test_TogoWS.TogoSearch)
>> Bio.TogoWS.search_iter("pubmed", "human porin") etc
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>> File "C:\Users\Public\BioPython3\biopython\Tests\test_TogoWS.py",
>> line 434, in test_pubmed_search_porin
>> self.check("pubmed", "human porin", ["21189321", "21835183"])
>> File "C:\Users\Public\BioPython3\biopython\Tests\test_TogoWS.py",
>> line 463, in check
>> search_count = TogoWS.search_count(database, search_term)
>> File
>> "C:\Users\Public\BioPython3\biopython\build\lib.win-amd64-3.4\Bio\TogoWS\__init__.py",
>> line 167, in search_count
>> count = int(handle.read().strip())
>> ValueError: invalid literal for int() with base 10: '<!DOCTYPE html
>> PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<html
>> xmlns="http://www.w3.org/1999/xhtml">\n<head>\n <meta
>> http-equiv="Content-Type" c
>>
>> ======================================================================
>> ERROR: test_pubmed_search_togows (test_TogoWS.TogoSearch)
>> Bio.TogoWS.search_iter("pubmed", "TogoWS") etc
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>> File "C:\Users\Public\BioPython3\biopython\Tests\test_TogoWS.py",
>> line 420, in test_pubmed_search_togows
>> self.check("pubmed", "TogoWS", ["20472643"])
>> File "C:\Users\Public\BioPython3\biopython\Tests\test_TogoWS.py",
>> line 463, in check
>> search_count = TogoWS.search_count(database, search_term)
>> File
>> "C:\Users\Public\BioPython3\biopython\build\lib.win-amd64-3.4\Bio\TogoWS\__init__.py",
>> line 167, in search_count
>> count = int(handle.read().strip())
>> ValueError: invalid literal for int() with base 10: '<!DOCTYPE html
>> PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<html
>> xmlns="http://www.w3.org/1999/xhtml">\n<head>\n <meta
>> http-equiv="Content-Type" c
>>
>> ----------------------------------------------------------------------
>> _______________________________________________
>> Biopython-dev mailing list
>> Biopython-dev at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/biopython-dev
>
>
More information about the Biopython-dev
mailing list