Skip to content

Entrez egquery example doctest breaking #4698

@peterjc

Description

@peterjc

Our doctest:

>>> from Bio import Entrez
>>> Entrez.email = "[email protected]"
>>> handle = Entrez.egquery(term="biopython")
>>> record = Entrez.read(handle)
>>> handle.close()
>>> for row in record["eGQueryResult"]:
...     if "pmc" in row["DbName"]:
...         print(int(row["Count"]) > 60)
True

is failing with urllib.error.URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>

This appears to be a general problem with EGQuery, consider the example given on https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EGQuery which is: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/egquery.fcgi?term=asthma

Right now in Firefox this redirects to https://ext-http-eutils.linkerd.ncbi.nlm.nih.gov/gquery?term=asthma&retmode=xml and gives "Server Not Found".

i.e. This looks like an NCBI problem, not a Biopython error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions