Metadata file path doesn't exist error (but it does exist)


I am trying to run this command but am getting an error that my metadata.tsv file is not a file.

Here is what I ran:
qiime feature-table summarize
–i-table home/gtbui/Documents/EXP30/qiime2-analysis/dada2_trim_33_280/table.qza
–o-visualization home/gtbui/Documents/EXP30/qiime2-analysis/dada2_trim_33_280/table.qzv
–m-sample-metadata-file home/gtbui/Documents/EXP30/metadata.tsv

This is the error
Traceback (most recent call last):
File “/opt/anaconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/q2cli/click/”, line 163, in _convert_metadata
artifact = qiime2.Artifact.load(fp)
File “/opt/anaconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/qiime2/sdk/”, line 66, in load
archiver = archive.Archiver.load(filepath)
File “/opt/anaconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/qiime2/core/archive/”, line 299, in load
archive = cls.get_archive(filepath)
File “/opt/anaconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/qiime2/core/archive/”, line 259, in get_archive
raise ValueError("%s does not exist." % filepath)
ValueError: home/gtbui/Documents/EXP30/metadata.tsv does not exist.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/opt/anaconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/q2cli/click/”, line 166, in _convert_metadata
metadata = qiime2.Metadata.load(fp)
File “/opt/anaconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/qiime2/metadata/”, line 309, in load
return MetadataReader(filepath).read(into=cls,
File “/opt/anaconda3/envs/qiime2-2019.10/lib/python3.6/site-packages/qiime2/metadata/”, line 47, in init
“(not a directory): %s” % filepath) Metadata file path doesn’t exist, or the path points to something other than a file. Please check that the path exists, has read permissions, and points to a regular file (not a directory): home/gtbui/Documents/EXP30/metadata.tsv

There may be more errors present in the metadata file. To get a full report, sample/feature metadata files can be validated with Keemei:

Find details on QIIME 2 metadata requirements here: Metadata in QIIME 2 — QIIME 2 2019.10.0 documentation

**I have triple-checked my file’s path and that is not the issue here. There might be something wrong with my metadata.tsv file itself? I have used this file with cutadapt for the following code with no issues: **

qiime cutadapt demux-single
–i-seqs /home/gtbui/Documents/EXP30/qiime2-analysis/multiplexed_seqs.qza
–m-barcodes-file /home/gtbui/Documents/EXP30/metadata.tsv
–m-barcodes-column BarcodeSequence
–p-error-rate 0
–o-per-sample-sequences /home/gtbui/Documents/EXP30/qiime2-analysis/demultiplexed_seqs.qza
–o-untrimmed-sequences /home/gtbui/Documents/EXP30/qiime2-analysis/untrimmed_seqs.qza

I am new to 16S analysis so am very appreciative of any type of help. Thank you!

Hi @gbu,

I am guessing, but I think the issue way be that your metadata is not located at


(which is a relative path compared to your current working directory), but rather at


which would give you the absolute path.

I find the tab ([->|]) key to be really helpful for me with paths, because you can always tab complete to see if what you're looking for is there, and how to get to it.



Hi Justine!

Wow, what a great lesson on relative versus absolute paths. That solved the issue. Thank you!!


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