Hclust2.py error distance matrix finite values

I was trying to create heatmap using command:
hclust2.py -i merged_abundance_table_species.txt -o abundance_heatmap_species.png --f_dist_f braycurtis --s_dist_f braycurtis --cell_aspect_ratio 0.5 -l --flabel_size 10 --max_flabel_len 100 --max_slabel_len 100 --minv 0.1 --dpi 300 --ftop 25

But I get this Error:
Traceback (most recent call last):
File “/home/rakesh/anaconda3/bin/hclust2.py”, line 825, in
File “/home/rakesh/anaconda3/bin/hclust2.py”, line 803, in hclust2_main
File “/home/rakesh/anaconda3/bin/hclust2.py”, line 380, in shcluster
self.shclusters = sph.linkage(self.s_dm, method=self.args.slinkage)
File “/home/rakesh/anaconda3/lib/python3.8/site-packages/scipy/cluster/hierarchy.py”, line 1057, in linkage
raise ValueError("The condensed distance matrix must contain only "
ValueError: The condensed distance matrix must contain only finite value.

Kindly explain how would I resolve this error. I saw a similar issue they said it is due the rows with zero abundance but how should I remove those values?

Thank You
Saraswati Awasthi