Skip to content

GO data retrieval gets stuck on page 670 #253

Open
@ghost

Description

In the GO.py file in the inputs directory, running line 503 for the url https://www.ebi.ac.uk/QuickGO/services/ontology/go/terms?page=670 gives the error: json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 7961 (char 7960)

To Reproduce
Steps to reproduce the behavior:

  1. Create instance of GeneOntology class: self.go_ontology = go_util.GeneOntology()
    E.g. with CrossBar's go adapter: https://github.com/HUBioDataLab/CROssBAR-BioCypher-Migration/blob/bde7c76a9cc888da2580c4fc2c6ac32690495a37/bccb/go_adapter.py#L242C13-L242C54

Expected behavior
Should retrieve data as per same behaviour as previous pages.

Traceback

Traceback (most recent call last):
  File "/Users/leonarle/Documents/project-template/create_knowledge_graph.py", line 263, in <module>
    main()
  File "/Users/leonarle/Documents/project-template/create_knowledge_graph.py", line 218, in main
    go_adapter.download_go_data(cache=True)
  File "/Users/leonarle/Documents/project-template/template_package/adapters/go_adapter.py", line 242, in download_go_data
    self.go_ontology = go_util.GeneOntology()
                       ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/leonarle/anaconda3/lib/python3.11/site-packages/pypath/utils/go.py", line 104, in __init__
    self._load()
  File "/Users/leonarle/anaconda3/lib/python3.11/site-packages/pypath/utils/go.py", line 121, in _load
    self._load_terms()
  File "/Users/leonarle/anaconda3/lib/python3.11/site-packages/pypath/utils/go.py", line 134, in _load_terms
    self._terms = self._terms_provided or go_input.go_terms_quickgo()
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/leonarle/anaconda3/lib/python3.11/site-packages/pypath/inputs/go.py", line 511, in go_terms_quickgo
    this_result = json.loads(c.result)
                  ^^^^^^^^^^^^^^^^^^^^
  File "/Users/leonarle/anaconda3/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/leonarle/anaconda3/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/leonarle/anaconda3/lib/python3.11/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
               ^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 7961 (char 7960)

Desktop (please complete the following information):

  • OS: Mac OS 13.4.1
  • Python version: 3.11.4
  • Version: v0.15.4

Metadata

Metadata

Assignees

Labels

bugProblem in the code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions