# Help with QIIME 2 2018.11 API qiime2.Metadata.from\_artifact()

**URL:** <https://forum.qiime2.org/t/help-with-qiime-2-2018-11-api-qiime2-metadata-from-artifact/7391>\
**Category:** Technical Support\
**Created:** [December 11, 2018, 5:44pm UTC](https://forum.qiime2.org/t/help-with-qiime-2-2018-11-api-qiime2-metadata-from-artifact/7391 "2018-12-11T17:44:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fasnicar](https://forum.qiime2.org/user_avatar/forum.qiime2.org/fasnicar/32/204_2.png) [@fasnicar](https://forum.qiime2.org/u/fasnicar)\
**Post date:** [December 11, 2018, 5:44pm UTC](https://forum.qiime2.org/t/help-with-qiime-2-2018-11-api-qiime2-metadata-from-artifact/7391/1 "2018-12-11T17:44:34Z")

</div>

Hello,

I was trying to run the following code:

```auto
from qiime2.plugins.metadata.visualizers import tabulate
denoising_stats_viz = tabulate(input=denoising_stats_art)                                                          

```

But I got the following error:

```auto
TypeError Traceback (most recent call last)
<ipython-input-23-9b6d5a9c1715> in <module>
----> 1 denoising_stats_viz = tabulate(input=denoising_stats_art)

<decorator-gen-228> in tabulate(input, page_size)

/opt/conda/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2/sdk/action.py in bound_callable(*args, **kwargs)
    197 
    198 # Type management
--> 199 self.signature.check_types(**user_input)
    200 output_types = self.signature.solve_output(**user_input)
    201 callable_args = {}

/opt/conda/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2/core/type/signature.py in check_types(self, **kwargs)
    299 "Parameter %r received an argument of type %r. An "
    300 "argument of subtype %r is required." % (
--> 301 name, kwargs[name].type, spec.qiime_type))
    302 
    303 def solve_output(self, **input_types):

TypeError: Parameter 'input' received an argument of type SampleData[DADA2Stats]. An argument of subtype Metadata is required.

```

I searched and I found your post ([Visualization API - #3 by jairideout](https://forum.qiime2.org/t/visualization-api/1023/3)) that is suggesting to do:

```auto
# Since `tabulate` accepts a `Metadata` object as input
# (not an `Artifact`), we need to view the artifact as metadata.
# Create a `Metadata` object from the input artifact --
# this preserves the input artifact's provenance in the
# visualization that's created by `tabulate` too!
taxonomy_md = qiime2.Metadata.from_artifact(taxonomy)

```

I'm running QIIME 2 2018.11 from Docker and `qiime2.Metadata.from_artifact` do not exists there.

Do you happen to know where that function has been moved?

Any help will be really appreciated.

Many thanks,  
Francesco

---

<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:** [December 12, 2018, 4:05am UTC](https://forum.qiime2.org/t/help-with-qiime-2-2018-11-api-qiime2-metadata-from-artifact/7391/2 "2018-12-12T04:05:05Z")

</div>

Hey there @fasnicar!

You will want to _view_ the Artifact as `Metadata`:

```bash
denoising_stats_viz = tabulate(input=denoising_stats_art.view(qiime2.Metadata))

```

Hope that helps!
