shenwei356 / taxonkit

A Practical and Efficient NCBI Taxonomy Toolkit, also supports creating NCBI-style taxdump files for custom taxonomies like GTDB/ICTV
https://bioinf.shenwei.me/taxonkit
MIT License
369 stars 29 forks source link

An error occurs when running the latest version #81

Closed weiguanyue closed 1 year ago

weiguanyue commented 1 year ago

Report this error no matter what you're running

Describe your issue

panic: runtime error: index out of range [5] with length 5

goroutine 18 [running]: github.com/shenwei356/taxonkit/taxonkit/cmd.stringSplitN({0xc00bf9e0a0?, 0xc000173639?}, {0x93cee8, 0x1}, 0x6?, 0xc000290e40?) /home/shenwei/go/src/github.com/shenwei356/taxonkit/taxonkit/cmd/util.go:45 +0x1cd github.com/shenwei356/taxonkit/taxonkit/cmd.getNodes({0xc0001bc420, 0x22}, 0x0) /home/shenwei/go/src/github.com/shenwei356/taxonkit/taxonkit/cmd/util-basic-data.go:162 +0x1f3 github.com/shenwei356/taxonkit/taxonkit/cmd.loadData.func1() /home/shenwei/go/src/github.com/shenwei356/taxonkit/taxonkit/cmd/util-basic-data.go:57 +0x134 created by github.com/shenwei356/taxonkit/taxonkit/cmd.loadData /home/shenwei/go/src/github.com/shenwei356/taxonkit/taxonkit/cmd/util-basic-data.go:53 +0x18d

shenwei356 commented 1 year ago

Thanks for reporting, but could you please provide more details? Like the command and input data.

I can't locate the bug with the current panic information. I guess the taxdump files you download or make are incomplete.

weiguanyue commented 1 year ago

this is the code: taxonkit lineage taxids.txt |head

It's an error no matter how it runs

head taxids.txt

9606

9913

376619

this is my taxdump

however, view software No problem

At 2023-06-08 18:24:38, "Wei Shen" @.***> wrote:

Thanks for reporting, but could you please provide more details? Like the command and input data.

I can't locate the bug with the current panic information. I guess the taxdump files you download or make are incomplete.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

shenwei356 commented 1 year ago

The error implies the nodes.dmp file is truncated/incomplete, which usually results from an erroneous or unfinished download.

It's recommended to re-download the taxdump file. https://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz

weiguanyue commented 1 year ago

Yes, this problem has been solved after the update.

Thank you very much for your help.

Best wishes

At 2023-06-08 20:06:50, "Wei Shen" @.***> wrote:

The error implies the nodes.dmp file is truncated/incomplete, which usually results from an erroneous or unfinished download.

It's recommended to re-download the taxdump file. https://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

shenwei356 commented 1 year ago

Cheers! Please let me know, opening another issue, if you have any problems.