cokelaer / bioservices

Access to Biological Web Services from Python.
http://bioservices.readthedocs.io
Other
278 stars 60 forks source link

Unable to reach BioDBNet URL #256

Open JoshLoecker opened 1 year ago

JoshLoecker commented 1 year ago

Hi, I'm receiving the following error

WARNING [bioservices.BioDBNet:130]:  The URL (https://biodbnet-abcc.ncifcrf.gov/webServices/rest.php/biodbnetRestApi.json) provided cannot be reached.
CRITICAL[bioservices.BioDBNet:711]:  HTTPSConnectionPool(host='biodbnet-abcc.ncifcrf.gov', port=443): Max retries exceeded with url: /webServices/rest.php/biodbnetRestApi.json?method=getinputs (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)')))
CRITICAL[bioservices.BioDBNet:712]:  Query unsuccesful. Maybe too slow response.
    Consider increasing it with settings.TIMEOUT attribute 30

This is the code I'm using

biodbnet = BioDBNet(verbose=False)
biodbnet.services.TIMEOUT = 60

I'm able to access the URL in the warning (biodbnet-abcc.ncifcrf.gov) in a web browser. When I access the full URL in a browser, I get the following JSON back

{
    "input": [
        "Affy GeneChip Array",
        "Affy ID",
        "Affy Transcript Cluster ID",
        "Agilent ID",
        "Biocarta Pathway Name",
        "CodeLink ID",
        "dbSNP ID",
        "DrugBank Drug ID",
        "DrugBank Drug Name",
        "EC Number",
        "Ensembl Gene ID",
        "Ensembl Protein ID",
        "Ensembl Transcript ID",
        "EST Accession",
        "FlyBase Gene ID",
        "GenBank Nucleotide Accession",
        "GenBank Protein Accession",
        "Gene ID",
        "Gene Symbol",
        "Gene Symbol and Synonyms",
        "Gene Symbol Ordered Locus",
        "Gene Symbol ORF",
        "GI Number",
        "GO ID",
        "GSEA Standard Name",
        "H-Inv Locus ID",
        "H-Inv Protein ID",
        "H-Inv Transcript ID",
        "HGNC ID",
        "HMDB Metabolite",
        "HomoloGene ID",
        "Illumina ID",
        "InterPro ID",
        "IPI ID",
        "KEGG Compound ID",
        "KEGG Compound Name",
        "KEGG Disease ID",
        "KEGG Drug ID",
        "KEGG Drug Name",
        "KEGG Gene ID",
        "KEGG Pathway ID",
        "MaizeGDB ID",
        "MGI ID",
        "MIM ID",
        "miRBase ID",
        "miRBase Mature miRNA Acc",
        "NCIPID Pathway Name",
        "Organism Scientific Name",
        "PDB ID",
        "Pfam ID",
        "PharmGKB ID",
        "PubChem ID",
        "Reactome Pathway Name",
        "RefSeq Genomic Accession",
        "RefSeq mRNA Accession",
        "RefSeq Protein Accession",
        "SGD ID",
        "TAIR ID",
        "Taxon ID",
        "UniGene ID",
        "UniProt Accession",
        "UniProt Entry Name",
        "UniProt Protein Name",
        "UniSTS ID"
    ]
}

I am using bioservices version 1.11.2, installed from conda-forge

Thanks for any help!

JoshLoecker commented 1 year ago

Interestingly, I'm able to connect if I use a VPN.

I've been hitting the API fairly hard today working through some analysis, this error may be a result of rate limiting.