OSError: [Errno 36] File name too long

I am running the visualization after the core-metrics for diversity.

qiime diversity alpha-group-significance \

–i-alpha-diversity core-metrics-presort-4558-results/faith_pd_vector.qza
–m-metadata-file V4DHIgA03_mapfile.txt
–o-visualization core-metrics-presort-4558-results/faith_pd_vector.qzv
and this is what I got------------->
Plugin error from diversity:

[Errno 36] File name too long: ‘/tmp/qiime2-temp-pvsjon17/kruskal-wallis-pairwise-What%20is%20the%20relationship%20of%20affected%20family%20member%2Fs%20to%20donor%3F%20If%20family%20member%20is%20a%20twin%2C%20please%20check%20the%20appropriate%20sibling%20box%20AND%20%27other%27%20and%20note%20specifically.%20%20%20%28choice%3DFather%29.csv’

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


opening the file " /tmp/qiime2-q2cli-err-fs70eem2.log"

Traceback (most recent call last):
File “/gpfs/ysm/project/aa2349/conda_envs/qiime2-2019.4/lib/python3.6/site-packages/q2cli/commands.py”, line 311, in call
results = action(**arguments)
File “</gpfs/ysm/project/aa2349/conda_envs/qiime2-2019.4/lib/python3.6/site-packages/decorator.py:decorator-gen-398>”, line 2, in alpha_group_significance
File “/gpfs/ysm/project/aa2349/conda_envs/qiime2-2019.4/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 231, in bound_callable
output_types, provenance)
File “/gpfs/ysm/project/aa2349/conda_envs/qiime2-2019.4/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 427, in callable_executor
ret_val = self._callable(output_dir=temp_dir, **view_args)
File “/gpfs/ysm/project/aa2349/conda_envs/qiime2-2019.4/lib/python3.6/site-packages/q2_diversity/_alpha/_visualizer.py”, line 115, in alpha_group_significance
kw_H_pairwise.to_csv(pairwise_path)
File “/gpfs/ysm/project/aa2349/conda_envs/qiime2-2019.4/lib/python3.6/site-packages/pandas/core/generic.py”, line 3020, in to_csv
formatter.save()
File “/gpfs/ysm/project/aa2349/conda_envs/qiime2-2019.4/lib/python3.6/site-packages/pandas/io/formats/csvs.py”, line 157, in save
compression=self.compression)
File “/gpfs/ysm/project/aa2349/conda_envs/qiime2-2019.4/lib/python3.6/site-packages/pandas/io/common.py”, line 424, in _get_handle
f = open(path_or_buf, mode, encoding=encoding, newline="")
OSError: [Errno 36] File name too long: ‘/tmp/qiime2-temp-pvsjon17/kruskal-wallis-pairwise-What%20is%20the%20relationship%20of%20affected%20family%20member%2Fs%20to%20donor%3F%20If%20family%20member%20is%20a%20twin%2C%20please%20check%20the%20appropriate%20sibling%20box%20AND%20%27other%27%20and%20note%20specifically.%20%20%20%28choice%3DFather%29.csv’

How can I solve this issue?

Welcome to the forum, @neuroahmad.
This is an interesting issue you ran into! I think it will be pretty straightforward for you to fix.

Do you see how the filename in your error has a long series of words in it? (i.e. “What is the relationship… etc.”)

When you run alpha-group-significance, QIIME 2 generates new .csv files from the column headers in your metadata file. It appears that one of your column headers is a very long sentence. The operating system is unable to make a filename that long, so you are getting an error instead of a proper output file.

You should be able to correct this by shortening the long column header in your metadata file and re-running the command.

Let us know how it goes, ok?
Chris