Humann2:"The condensed distance matrix must contain only finite values" when barplotting

Hi all,
Thanks in advance for the help.
I’ve been working quite a long time with HumanN2 on a metagenomics dataset and never had this error before, no i see it for several gene familie abundances. I have merged the samples, normalized them to cpm, regrouped and renamed them according to Kegg Orthology, hence the filename example

humann2_barplot -i “/120422_datasetx_genefamilies_merged_norm_KO_REGROUP_KO_RENAME_meta.tsv” -s similarity metadata -f K01428 -m TIMEANDFEEDING -o GraphX -g -r -w 1

gives the following:
"Regrouping to genera (before selecting/sorting strata)
Traceback (most recent call last):
File “/tools/software/bioinfo-tools/miniconda/miniconda3/envs/Humann2/bin/humann2_barplot”, line 11, in
File “/tools/software/bioinfo-tools/miniconda/miniconda3/envs/Humann2/lib/python2.7/site-packages/humann2/tools/”, line 349, in main
table.sort( method )
File “/tools/software/bioinfo-tools/miniconda/miniconda3/envs/Humann2/lib/python2.7/site-packages/humann2/tools/”, line 256, in sort
order = sch.leaves_list( sch.linkage( norm.transpose(), metric=“braycurtis” ) )
File “/tools/software/bioinfo-tools/miniconda/miniconda3/envs/Humann2/lib/python2.7/site-packages/scipy/cluster/”, line 1109, in linkage
raise ValueError(“The condensed distance matrix must contain only "
ValueError: The condensed distance matrix must contain only finite values.”

I have been plotting genes out of this dataset regularly, only today I noticed this one, and tried some more genes. occurs sometimes.
Any ideas what could be causing it, is the data formatting? Did an infinite value sneak in some where?
Thanks alot!

I believe this is either an error from trying to compute a distance on an empty vector OR it may have to do with a change in how scipy handled 0 distances between versions. If you try the updated humann_barplot bundled with the current (v3) version of the software it should be more robust to these issues. The new barplot can still be used with data generated from HUMAnN 2.