etetoolkit / ete

Python package for building, comparing, annotating, manipulating and visualising trees. It provides a comprehensive API and a collection of command line tools, including utilities to work with the NCBI taxonomy tree.
http://etetoolkit.org
GNU General Public License v3.0
795 stars 214 forks source link

taxid not found #738

Open WJT0925 opened 10 months ago

WJT0925 commented 10 months ago
if 10239 in ncbi.get_lineage(int(sp)):

File "/home/jingtian/software/miniconda3/envs/py3/lib/python3.6/site-packages/ete3/ncbi_taxonomy/ncbiquery.py", line 241, in get_lineage raise ValueError("%s taxid not found" %taxid) ValueError: 3060017 taxid not found

ChongLC commented 5 months ago

Hi developer and @WJT0925,

I am also encountering a similar error. Below is the error message:

Traceback (most recent call last):
  File "/home/chong/miniconda3/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/home/chong/miniconda3/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "../rs_host_extractor.py", line 111, in worker
    full_lineages = get_full_lineages([taxonomy_id], ncbi)
  File "../rs_host_extractor.py", line 74, in get_full_lineages
    ranks = get_ranks(taxon_id, desired_ranks, ncbi)
  File "../rs_host_extractor.py", line 60, in get_ranks
    lineage = ncbi.get_lineage(taxid)
  File "/home/chong/miniconda3/lib/python3.8/site-packages/ete3/ncbi_taxonomy/ncbiquery.py", line 241, in get_lineage
    raise ValueError("%s taxid not found" %taxid)
ValueError: 3075052 taxid not found

While checking the NCBI Taxonomy, there is such a taxonomy (see the figure below). 3075052

I hope to hear a solution from you soon! Thank you.

Best regards, Chong