You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
frompyobo.sources.ncbigeneimportget_obodefget_obo_file(output_path: str):
"""Get the obo file."""obo_file=get_obo()
obo_file.write_obo(output_path, use_tqdm=True)
This resulted in the following error:
Traceback (most recent call last):
....
/src/ncbi_gene_pyobo/cli.py", line 57, in get_obo_file obo_file.write_obo(output_path, use_tqdm=True) File "/opt/anaconda3/envs/ncbi-gene-pyobo/lib/python3.10/site-packages/pyobo/struct/struct.py", line 711, in write_obo self._write_lines(it, fh) File "/opt/anaconda3/envs/ncbi-gene-pyobo/lib/python3.10/site-packages/pyobo/struct/struct.py", line 717, in _write_lines for line in it: File "/opt/anaconda3/envs/ncbi-gene-pyobo/lib/python3.10/site-packages/pyobo/struct/struct.py", line 700, in iterate_obo_lines yield from term.iterate_obo_lines(ontology=self.ontology, typedefs=self.typedefs) File "/opt/anaconda3/envs/ncbi-gene-pyobo/lib/python3.10/site-packages/pyobo/struct/struct.py", line 429, in iterate_obo_lines yield f"def: {self._definition_fp()}" File "/opt/anaconda3/envs/ncbi-gene-pyobo/lib/python3.10/site-packages/pyobo/struct/struct.py", line 400, in _definition_fp return f'"{obo_escape_slim(self.definition)}" [{comma_separate(self.provenance)}]' File "/opt/anaconda3/envs/ncbi-gene-pyobo/lib/python3.10/site-packages/pyobo/struct/utils.py", line 24, in obo_escape_slim rv = "".join(OBO_ESCAPE_SLIM.get(character, character) for character in string)TypeError: 'float' object is not iterable
pyobo call made via code:
This resulted in the following error:
The error points to line 24 below.
pyobo/src/pyobo/struct/utils.py
Lines 22 to 26 in cc2f27b
Reran it by casting
string
injoin()
[str(string)
]fixed the issue.
The text was updated successfully, but these errors were encountered: