biothings / mygene.py

mygene is an easy-to-use Python wrapper to access MyGene.Info services.
Other
82 stars 13 forks source link

502 Server Error: Bad Gateway for url: http://mygene.info/v3/query/ #24

Open BeataLILILI opened 1 month ago

BeataLILILI commented 1 month ago

Hi there. When trying to focus it keeps reporting the error "502 Server Error: bad gateway for url: http://mygene.info/v3/query/", I have tried running it at different times but it still gives this error. Is there any solution? FOCUS v0.803

focus import ./NTR.BLOOD.RNAARR.pos fusion --tissue blood --name NTR --assay array --output fusion

Starting log... [2024-07-30 08:42:10 - INFO] Preparing weight database [2024-07-30 08:42:11 - INFO] Starting import from FUSION database ./NTR.BLOOD.RNAARR.pos [2024-07-30 08:42:11 - INFO] Querying mygene servers for gene annotations [2024-07-30 08:43:12 - ERROR] 502 Server Error: Bad Gateway for url: http://mygene.info/v3/query/ [2024-07-30 08:43:12 - INFO] Finished importing prediction models

everaldorodrigo commented 1 month ago

Hello @BeataLILILI, could you provide more details about your context? For example: Python version, part of your Python code.

I just installed the mygene package and was able to query it successfully.

Also, could you check if the steps below work for you?

  1. Install mygene using pip:
pip install mygene
  1. Create a file named test_mygene.py with the following content:

    import mygene
    mg = mygene.MyGeneInfo()
    r = mg.getgene(1017)
    print(r)
  2. Run the Python script test_mygene.py:

    python test_mygene.py
  3. You should get a result similar to:

    {
    "_id": "1017",
    "_version": 2,
    "AllianceGenome": "1771",
    "HGNC": "1771",
    "MIM": "116953",
    ...
    }