Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GO data retrieval gets stuck on page 670 #253

Open
ghost opened this issue Jul 26, 2023 · 0 comments
Open

GO data retrieval gets stuck on page 670 #253

ghost opened this issue Jul 26, 2023 · 0 comments
Assignees
Labels
bug Problem in the code

Comments

@ghost
Copy link

ghost commented Jul 26, 2023

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
@ghost ghost added the bug Problem in the code label Jul 26, 2023
@deeenes deeenes self-assigned this Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Problem in the code
Projects
None yet
Development

No branches or pull requests

1 participant