althonos / althonos/pronto

Loading ontologies fails (for me) in 2.4.4

Aberta
#158 3 comentários 0 reações 0 responsáveis Ver no GitHub
bug external
Linguagem predominante
Python
Estrelas
267
Forks
48
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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?

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.