bioforensics / pytaxonkit

Python bindings for the TaxonKit library
Other
31 stars 2 forks source link

Bug: should not attempt to run taxonkit with empty input #18

Closed standage closed 2 years ago

standage commented 2 years ago

Observed behavior

>>> import pytaxonkit
>>> pytaxonkit.lineage([])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/standage/anaconda3/envs/mystt/lib/python3.8/site-packages/pytaxonkit.py", line 348, in lineage
    raise TaxonKitCLIError(err)  # pragma: no cover
pytaxonkit.TaxonKitCLIError: 10:27:36.278 [ERRO] xopen: no content

Expected behavior

Raise an exception or return an empty result without attempting to invoke taxonkit on an empty input.