althonos / althonos/pronto

Loading ontologies fails (for me) in 2.4.4

Offen
#158 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug external
Vorherrschende Sprache
Python
Sterne
267
Forks
48
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi!
I updated to the latest version (from 2.something<2) but immediately ran into trouble testing in a fresh venv:
```
>>> psi = pronto.Ontology.from_obo_library("psi-ms.obo")
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pronto/lib/python3.6/site-packages/pronto/ontology.py", line 207, in from_obo_library
f"http://purl.obolibrary.org/obo/{slug}", import_depth, timeout, threads
File "/tmp/pronto/lib/python3.6/site-packages/pronto/ontology.py", line 283, in __init__
cls(self).parse_from(_handle) # type: ignore
File "/tmp/pronto/lib/python3.6/site-packages/pronto/parsers/rdfxml.py", line 89, in parse_from
raise ValueError("could not find `owl:Ontology` element")
ValueError: could not find `owl:Ontology` element
```
so I tried with something from the docs:
```
>>> apo = pronto.Ontology.from_obo_library("apo.obo")
thread '' panicked at 'assertion failed: `(left != right)`
left: `0`,
right: `0`: Python threading is not initalized and the `auto-initialize` feature is not enabled.

Consider calling `pyo3::prepare_freethreaded_python()` before attempting to use Python APIs.', /tmp/pip-req-build-o2_6liwv/build/temp.linux-x86_64-3.6/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/gil.rs:233:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pronto/lib/python3.6/site-packages/pronto/ontology.py", line 207, in from_obo_library
f"http://purl.obolibrary.org/obo/{slug}", import_depth, timeout, threads
File "/tmp/pronto/lib/python3.6/site-packages/pronto/ontology.py", line 283, in __init__
cls(self).parse_from(_handle) # type: ignore
File "/tmp/pronto/lib/python3.6/site-packages/pronto/parsers/obo.py", line 18, in parse_from
doc = fastobo.iter(handle, ordered=True)
pyo3_runtime.PanicException: assertion failed: `(left != right)`
left: `0`,
right: `0`: Python threading is not initalized and the `auto-initialize` feature is not enabled.

Consider calling `pyo3::prepare_freethreaded_python()` before attempting to use Python APIs.
```
which left me with more unknowns, so I tried from local obo to rule out connection or networking-lib issues:
```
>>> psi = pronto.Ontology('psi-ms.obo')
thread '' panicked at 'assertion failed: `(left != right)`
left: `0`,
right: `0`: Python threading is not initalized and the `auto-initialize` feature is not enabled.

Consider calling `pyo3::prepare_freethreaded_python()` before attempting to use Python APIs.', /tmp/pip-req-build-o2_6liwv/build/temp.linux-x86_64-3.6/cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.15.1/src/gil.rs:233:21
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pronto/lib/python3.6/site-packages/pronto/ontology.py", line 283, in __init__
cls(self).parse_from(_handle) # type: ignore
File "/tmp/pronto/lib/python3.6/site-packages/pronto/parsers/obo.py", line 18, in parse_from
doc = fastobo.iter(handle, ordered=True)
pyo3_runtime.PanicException: assertion failed: `(left != right)`
left: `0`,
right: `0`: Python threading is not initalized and the `auto-initialize` feature is not enabled.

Consider calling `pyo3::prepare_freethreaded_python()` before attempting to use Python APIs.
```
The errors differ, but I assume they still might be connected somewhere. What could it be?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.