INCATools / INCATools/ontology-access-kit

JSONDecodeError when initializing OboGraphImplementation

Open
#337 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
198
Forks
35
Avg merge
3d 4h
Merged PRs (30d)
1

Description

## Overview
I wasn't sure which implementation to use for to load an Obograph, but `OboGraphImplementation` seemed aptly named for this, so I gave it a go. However I got an error when trying to initialize an `OboGraphImplementation` object.

## Code
```py
from oaklib.resource import OntologyResource
from oaklib.implementations.obograph.obograph_implementation import OboGraphImplementation
resource = OntologyResource(slug='path/to/mondo-example.owl', local=True)
oi = OboGraphImplementation(resource)
```

## Error
```
/Users/joeflack4/projects/ontology-access-kit/src/oaklib/converters/../../../tests/input/mondo-example.owl
Traceback (most recent call last):
File "/usr/local/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Process finished with exit code 1
```

## Additional information
It doesn't appear to be a problem with my `mondo-example.owl`, as I was able to successfully load an Obograph using `ProntoImplementation`.

Contributor guide

Open the contributing guide

Research direction

Start with the OboGraphImplementation initialization shown in the issue and trace how the OntologyResource for mondo-example.owl is loaded. Compare that path with ProntoImplementation, using the provided example to reproduce the JSONDecodeError. Done means the intended ontology input is handled correctly or the supported input expectations are made explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.