# RE: Error: Plugin error from diversity

**URL:** https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655
**Category:** Technical Support
**Created:** [September 5, 2021, 6:11pm UTC](https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655 "2021-09-05T18:11:03Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![MarwaTawfik](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/ee59a6/32.png) [@MarwaTawfik](https://forum.qiime2.org/u/MarwaTawfik)
#### Post date: [September 5, 2021, 6:11pm UTC](https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655/1 "2021-09-05T18:11:03Z")

</div>

> [@Error: Plugin error from diversity](https://forum.qiime2.org/t/error-plugin-error-from-diversity/3191/7):
>
> Hey @prestcat, I think you found another bug! Two for the price of one! Sorry, but it looks like this visualization isn’t interacting as expected on q2view. I was able to view it locally running qiime tools view faith-pd-group-significance.qzv, so please give that a shot for now. I [opened up a ticket for the q2view issue here](https://github.com/qiime2/q2-diversity/issues/187). Stay tuned, and I am really sorry, two separate bugs is pretty unfortunate. bugfrowning

Don't know how to comment of the original post:

This bug haven't been solved in the latest version of 2021.4  
having same problem with the eveness but not with faith\_pd\_vector.qza  
qiime diversity alpha-group-significance \

> --i-alpha-diversity core-metrics-results/evenness\_vector.qza   
> --m-metadata-file metadatasheet.tsv   
> --o-visualization core-metrics-results/evenness-group-significance.qzv  
> Plugin error from diversity:

float division by zero

Debug info has been saved to /tmp/qiime2-q2cli-err-yotl\_40h.log

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [September 5, 2021, 6:25pm UTC](https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655/2 "2021-09-05T18:25:17Z")

</div>



---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [September 5, 2021, 6:28pm UTC](https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655/3 "2021-09-05T18:28:15Z")

</div>

Hi @MarwaTawfik!

> [@MarwaTawfik](#):
>
> This bug haven't been solved in the latest version of 2021.4

Thanks for doing your research, but that bug you linked to has been addressed, and I don't think its relevant to the error message you have posted. Let's take a closer look:

> [@MarwaTawfik](#):
>
> float division by zero

Ahh that doesn't sound like it is related to the bug you shared at the top of your post - this looks like an issue with the nature of the data - can you please either re-run with the `--verbose` flag, or share the contents of the log file:

> [@MarwaTawfik](#):
>
> /tmp/qiime2-q2cli-err-yotl\_40h.log

Thanks!

:qiime2:

---

<div class="post-metadata">

### Author: ![MarwaTawfik](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/ee59a6/32.png) [@MarwaTawfik](https://forum.qiime2.org/u/MarwaTawfik)
#### Post date: [September 6, 2021, 12:08pm UTC](https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655/4 "2021-09-06T12:08:06Z")

</div>

Thanks for your reply, 🙂

```bash
(qiime2-2021.4) r01mt19@catling:~/qiime2/nutriprog$ nice -n 19 qiime diversity alpha-group-significance \
> --i-alpha-diversity core-metrics-results/evenness_vector.qza \
> --m-metadata-file metadatasheet.tsv \
> --o-visualization core-metrics-results/evenness-group-significance.qzv
Plugin error from diversity:

  float division by zero

nano /tmp/qiime2-q2cli-err-yotl_40h.log
Traceback (most recent call last):
  File "/home/r01mt19/.conda/envs/qiime2-2021.4/lib/python3.8/site-packages/q2cli/commands.py", line 329, in __call__
    results = action(**arguments)
  File "<decorator-gen-435>", line 2, in alpha_group_significance
  File "/home/r01mt19/.conda/envs/qiime2-2021.4/lib/python3.8/site-packages/qiime2/sdk/action.py", line 244, in bound_callable
    outputs = self._callable_executor_(scope, callable_args,
  File "/home/r01mt19/.conda/envs/qiime2-2021.4/lib/python3.8/site-packages/qiime2/sdk/action.py", line 452, in _callable_executor_
    ret_val = self._callable(output_dir=temp_dir, **view_args)
  File "/home/r01mt19/.conda/envs/qiime2-2021.4/lib/python3.8/site-packages/q2_diversity/_alpha/_visualizer.py", line 97, in alpha_group_significance
    H, p = scipy.stats.mstats.kruskalwallis(groups[i],
  File "/home/r01mt19/.conda/envs/qiime2-2021.4/lib/python3.8/site-packages/scipy/stats/mstats_basic.py", line 1239, in kruskal
    T = 1. - sum(v*(k**3-k) for (k,v) in ties.items())/float(ntot**3-ntot)
ZeroDivisionError: float division by zero

```

I ran qiime2 commands also in nf-core workflow and it gives back this error

```bash
Error executing process > 'AMPLISEQ:QIIME2_DIVERSITY:QIIME2_DIVERSITY_ALPHA (evenness_vector)'

Caused by:
  Process `AMPLISEQ:QIIME2_DIVERSITY:QIIME2_DIVERSITY_ALPHA (evenness_vector)` terminated with an error exit status (1)

Command executed:

  export XDG_CONFIG_HOME="${PWD}/HOME"

  qiime diversity alpha-group-significance --i-alpha-diversity evenness_vector.qza --m-metadata-file all.metadatasheet.tsv --o-visualization evenness_vector-vis.qzv
  qiime tools export --input-path evenness_vector-vis.qzv --output-path "alpha_diversity/evenness_vector"

  echo $(qiime --version | sed -e "s/q2cli version //g" | tr -d '`' | sed -e "s/Run qiime info for more version details.//g") > qiime2.version.txt

Command exit status:
  1

Command output:
  (empty)

Command error:
  QIIME is caching your current deployment for improved performance. This may take a few moments and should only happen once per deployment.
  Plugin error from diversity:

    float division by zero

  Debug info has been saved to /tmp/qiime2-q2cli-err-nl5v9u8g.log

Work dir:
  /uoa/scratch/users/r01mt19/amliseq/16Ssamples/trimGalored/work/b1/ec9d26615d4b47504e02216f8b8473

Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out`

nano /tmp/qiime2-q2cli-err-nl5v9u8g.log
Traceback (most recent call last):
  File "/opt/conda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2cli/commands.py", line 329, in __call__
    results = action(**arguments)
  File "<decorator-gen-443>", line 2, in alpha_group_significance
  File "/opt/conda/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
    output_types, provenance)
  File "/opt/conda/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 452, in _callable_executor_
    ret_val = self._callable(output_dir=temp_dir, **view_args)
  File "/opt/conda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_diversity/_alpha/_visualizer.py", line 98, in alpha_group_significance
    groups[j])
  File "/opt/conda/envs/qiime2-2021.2/lib/python3.6/site-packages/scipy/stats/mstats_basic.py", line 1243, in kruskal
    T = 1. - sum(v*(k**3-k) for (k,v) in ties.items())/float(ntot**3-ntot)
ZeroDivisionError: float division by zero

 
nano /tmp/qiime2-q2cli-err-nl5v9u8g.log

Traceback (most recent call last):
  File "/opt/conda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2cli/commands.py", line 329, in __call__
    results = action(**arguments)
  File "<decorator-gen-443>", line 2, in alpha_group_significance
  File "/opt/conda/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
    output_types, provenance)
  File "/opt/conda/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 452, in _callable_executor_
    ret_val = self._callable(output_dir=temp_dir, **view_args)
  File "/opt/conda/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_diversity/_alpha/_visualizer.py", line 98, in alpha_group_significance
    groups[j])
  File "/opt/conda/envs/qiime2-2021.2/lib/python3.6/site-packages/scipy/stats/mstats_basic.py", line 1243, in kruskal
    T = 1. - sum(v*(k**3-k) for (k,v) in ties.items())/float(ntot**3-ntot)
ZeroDivisionError: float division by zero

```

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [September 7, 2021, 3:22pm UTC](https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655/6 "2021-09-07T15:22:01Z")

</div>



---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [September 7, 2021, 3:35pm UTC](https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655/7 "2021-09-07T15:35:03Z")

</div>

Thanks @MarwaTawfik! It sounds like the issue might actually be in your evenness vector - that error implies that at there might be some issue with at least one of the pairwise comparisons. Can you share `core-metrics-results/evenness_vector.qza` with me? You can send a download link in a private message to me if you don't feel comfortable sharing publicly. Thanks!

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [September 7, 2021, 3:35pm UTC](https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655/8 "2021-09-07T15:35:12Z")

</div>



---

<div class="post-metadata">

### Author: ![MarwaTawfik](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/ee59a6/32.png) [@MarwaTawfik](https://forum.qiime2.org/u/MarwaTawfik)
#### Post date: [September 9, 2021, 11:16am UTC](https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655/9 "2021-09-09T11:16:57Z")

</div>

Thanks, Mathew  
I confirm I sent the following to you via a private message when requested.

> core-metrics-results/evenness\_vector.qza

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [September 9, 2021, 1:31pm UTC](https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655/10 "2021-09-09T13:31:34Z")

</div>

Hi @MarwaTawfik - yes, I received your message, thank you for your patience!

You evenness vector result is missing two values, one for sample s178 and one for s185 - the next question here is to figure out why! Could you please send me your feature table, the one you used in `core-metrics-phylogenetic`? The artifact's uuid is `2f4705ee-ef80-48f4-9a36-ed78b2249e60`

Thanks!

---

<div class="post-metadata">

### Author: ![MarwaTawfik](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/m/ee59a6/32.png) [@MarwaTawfik](https://forum.qiime2.org/u/MarwaTawfik)
#### Post date: [September 9, 2021, 1:43pm UTC](https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655/11 "2021-09-09T13:43:16Z")

</div>

> [@thermokarst](#):
>
> uuid is `2f4705ee-ef80-48f4-9a36-ed78b2249e60`

Just sent the aritifact with that certain uuid

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [September 9, 2021, 4:17pm UTC](https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655/12 "2021-09-09T16:17:19Z")

</div>



---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [September 10, 2021, 8:25pm UTC](https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655/13 "2021-09-10T20:25:32Z")

</div>

Hi @MarwaTawfik - I was able to work through this problem a bit more - the reason this is failing is because some of your samples have fewer than 2 observed features, after rarefying your table. One option is to _manually_ compute the Pielou's Evenness using [`diversity-lib pielou-evenness`](https://docs.qiime2.org/2021.8/plugins/available/diversity-lib/pielou-evenness/), specifying the `--p-drop-undefined-samples`. Then you can plug the output of that command into `alpha-group-significance`!

Keep us posted!

:qiime2:

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [September 10, 2021, 8:25pm UTC](https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655/14 "2021-09-10T20:25:34Z")

</div>



---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [October 12, 2021, 2:26am UTC](https://forum.qiime2.org/t/re-error-plugin-error-from-diversity/20655/15 "2021-10-12T02:26:33Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
