# Plugin error from taxa: 'float' object jas no attribute 'split'

**URL:** https://forum.qiime2.org/t/plugin-error-from-taxa-float-object-jas-no-attribute-split/20073
**Category:** Technical Support
**Tags:** taxonomy
**Created:** [July 1, 2021, 7:58pm UTC](https://forum.qiime2.org/t/plugin-error-from-taxa-float-object-jas-no-attribute-split/20073 "2021-07-01T19:58:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Daniel\_Zagal](https://forum.qiime2.org/user_avatar/forum.qiime2.org/daniel_zagal/32/11370_2.png) [@Daniel\_Zagal](https://forum.qiime2.org/u/Daniel_Zagal)
#### Post date: [July 1, 2021, 7:58pm UTC](https://forum.qiime2.org/t/plugin-error-from-taxa-float-object-jas-no-attribute-split/20073/1 "2021-07-01T19:58:52Z")

</div>

Hi there,

I am using:  
qiime2-2021.4  
miniconda3  
WSL (Ubuntu 20.04)  
Windows 10 x64

I am trying to make a taxa bar plot:

I have used feature-table.qza and sample\_metadata.txt files to get several core metrics. I am pretty sure the issue lays in the taxonomy.qza file. I imported the taxonomy artifact from a .txt file. I think there is the culprit, but I don't know what is the problem or how to solve it.  
The tab delimited .txt file contains two columns: Feature ID and Taxon. Taxon contains the seven taxonomic levels separated by semicolons.

Code:  
qiime taxa barplot --i-table feature-table.qza --i-taxonomy taxonomy.qza --m-metadata-file sample\_metadata.txt --o-visualization taxa\_barplot.qzv

Error message:  
Plugin error from taxa:

'float' object has no attribute 'split'

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

Log file:  
Traceback (most recent call last):  
File "/home/dzagal/miniconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2cli/commands.py", line 329, in **call**  
results = action(\*\*arguments)  
File "", line 2, in barplot  
File "/home/dzagal/miniconda3/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/dzagal/miniconda3/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/dzagal/miniconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2\_taxa/\_visualizer.py", line 41, in barplot  
collapsed\_tables = \_extract\_to\_level(taxonomy, table)  
File "/home/dzagal/miniconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2\_taxa/\_util.py", line 37, in \_extract\_to\_level  
max\_obs\_lvl = \_get\_max\_level(taxonomy)  
File "/home/dzagal/miniconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2\_taxa/\_util.py", line 11, in \_get\_max\_level  
return taxonomy.apply(lambda x: len(x.split(';'))).max()  
File "/home/dzagal/miniconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/pandas/core/series.py", line 4138, in apply  
mapped = lib.map\_infer(values, f, convert=convert\_dtype)  
File "pandas/\_libs/lib.pyx", line 2467, in pandas.\_libs.lib.map\_infer  
File "/home/dzagal/miniconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2\_taxa/\_util.py", line 11, in   
return taxonomy.apply(lambda x: len(x.split(';'))).max()  
AttributeError: 'float' object has no attribute 'split'

I hope this helps you help me!

Thanks!

Daniel

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [July 2, 2021, 6:15am UTC](https://forum.qiime2.org/t/plugin-error-from-taxa-float-object-jas-no-attribute-split/20073/2 "2021-07-02T06:15:17Z")

</div>

Welcome to the forum, @Daniel_Zagal !

> [@Daniel\_Zagal](#):
>
> I am pretty sure the issue lays in the taxonomy.qza file.

You're right! This issue is saying (as you have surmised) that a taxonomy cannot be parsed correctly, because it does not have semicolons.

> [@Daniel\_Zagal](#):
>
> Taxon contains the seven taxonomic levels separated by semicolons.

This issue can be caused by even one taxonomy that cannot parse correctly, e.g., if it is missing an annotation or is not semicolon-delimited. See here for more details:

> [@Taxa barplot plugin error](https://forum.qiime2.org/t/taxa-barplot-plugin-error/3219):
>
> Hello! I am having a similar issue to a few other threads, but I still can't quite figure out what is wrong. I am trying to use the QIIME2 pipeline on ITS2 amplicons for the algae Symbiodinium (found in corals). There is a small Symbiodinium database that is available for this, which I have used to run closed-reference feature clustering at 97% (I first tried using a naive-bayes trained classifier, but with such a small database, my final taxa barplots did not give enough resolution, I believe d…

I recommend starting there to see if any of the entries is missing a taxonomy.

Good luck!

---

<div class="post-metadata">

### Author: ![Daniel\_Zagal](https://forum.qiime2.org/user_avatar/forum.qiime2.org/daniel_zagal/32/11370_2.png) [@Daniel\_Zagal](https://forum.qiime2.org/u/Daniel_Zagal)
#### Post date: [July 3, 2021, 7:07pm UTC](https://forum.qiime2.org/t/plugin-error-from-taxa-float-object-jas-no-attribute-split/20073/3 "2021-07-03T19:07:50Z")

</div>

Hello @Nicholas_Bokulich,

Thank you so much for your quick response! I knew this had been resolved before and you pointed me in the right direction.

I was able to solve the issue. In my case all the features were present, but 182 out of 43000+ features did not have any taxonomic assignment. I found this out by opening the .txt file in excel and sorting the table by taxon. The features without taxa assignment were all at the end. I populated the empty taxa with 'Unassigned' and saved. It worked!

Thanks again!

---

<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: [August 4, 2021, 1:08am UTC](https://forum.qiime2.org/t/plugin-error-from-taxa-float-object-jas-no-attribute-split/20073/4 "2021-08-04T01:08:22Z")

</div>

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