exporting data: Operation not permitted

Hi, I had the same problem.I run the code you seggusted and the results showed: No such file or directory

(qiime2-2019.7) [email protected]:~/Desktop/2021/001-FEILD OIL/A.HJY.ITs.89.qiime2/valid/WQL$ qiime tools export \

--input-path sample-contingency-filtered-table47715.qza
--output-path exported-feature-table
Traceback (most recent call last):
File "/home/qiime2/miniconda/envs/qiime2-2019.7/bin/qiime", line 11, in
sys.exit(qiime())
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/builtin/tools.py", line 56, in export_data
result.export_data(output_path)
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/result.py", line 137, in export_data
str(self._archiver.data_dir), str(output_dir))
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/distutils/dir_util.py", line 163, in copy_tree
dry_run=dry_run)
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/distutils/file_util.py", line 158, in copy_file
os.utime(dst, (st[ST_ATIME], st[ST_MTIME]))
PermissionError: [Errno 1] Operation not permitted
(qiime2-2019.7) [email protected]:~/Desktop/2021/001-FEILD OIL/A.HJY.ITs.89.qiime2/valid/WQL$ ls -lah ~/Desktop/2021/001-FEILD OIL/A.HJY.ITs.89.qiime2/valid/WQL
ls: cannot access '/home/qiime2/Desktop/2021/001-FEILD': No such file or directory
ls: cannot access 'OIL/A.HJY.ITs.89.qiime2/valid/WQL': No such file or directory

Hi @RitaHou2018, welcome to the forum!

From the error message you provided, these file paths don't appear to be accessible on your machine:

This may be due to a permissions issue, similar to the thread you shared. From that thread, I'd recommend trying the following (if you haven't already):

You could try giving a different output directory like “exported” instead of “\”. Or since this is a permission error you can try throwing a “sudo” in the command.

If the above doesn't work, can you please share some additional details on the machine/network/server you are using to run QIIME 2? This may help us to determine why you are running into permission issues with these file paths.

2 Likes

Hi @RitaHou2018, me again!

After taking a closer look at this, it actually looks like the problem you're running into is due to an un-escaped whitespace between the two directory names included in your original command line entry:

You can escape the whitespace between each of these directories when running the ls -lah command from your original post (or any CLI command) by prefixing the whitespace with a \, like so:

ls -lah ~/Desktop/2021/001-FEILD\ OIL/A.HJY.ITs.89.qiime2/valid/WQL

This should resolve the issue, but please let me know if you run into any other snags!

Cheers,
Liz

1 Like

Hi, I changed the file name and the file can be found now. But the problem remains.
(qiime2-2019.7) [email protected]:~/Desktop/2021/001-FeildOil/A.HJY.ITs.89.qiime2/valid/WQL$ ls -lah ~/Desktop/2021/001-FeildOil/A.HJY.ITs.89.qiime2/valid/WQL
total 84M
drwxrwxrwx 1 root root 12K Jul 14 08:59 .
drwxrwxrwx 1 root root 0 Jul 13 09:15 ..
-rwxrwxrwx 1 root root 291K Jul 13 09:59 demux.qzv
drwxrwxrwx 1 root root 0 Jul 14 08:59 exported-feature-table
-rwxrwxrwx 1 root root 6.5M Jul 13 09:55 joined-demux.qza
-rwxrwxrwx 1 root root 342 Jul 13 09:55 metadata.csv
-rwxrwxrwx 1 root root 17K Jul 13 10:21 rep-seqs-dada0.qza
-rwxrwxrwx 1 root root 210K Jul 13 10:25 rep-seqs-dada0.qzv
-rwxrwxrwx 1 root root 16K Jul 13 10:29 rep-seqs-dada207.qza
-rwxrwxrwx 1 root root 208K Jul 13 10:30 rep-seqs-dada207.qzv
-rwxrwxrwx 1 root root 16K Jul 13 12:03 sample-contingency-filtered-table47715.qza

*(qiime2-2019.7) [email protected]:~/Desktop/2021/001-FeildOil/A.HJY.ITs.89.qiime2/valid/WQL$ qiime tools export *
*> --input-path sample-contingency-filtered-table47715.qza *
> --output-path exported-feature-table
Traceback (most recent call last):
File "/home/qiime2/miniconda/envs/qiime2-2019.7/bin/qiime", line 11, in
sys.exit(qiime())
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/builtin/tools.py", line 56, in export_data
result.export_data(output_path)
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/result.py", line 137, in export_data
str(self._archiver.data_dir), str(output_dir))
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/distutils/dir_util.py", line 163, in copy_tree
dry_run=dry_run)
File "/home/qiime2/miniconda/envs/qiime2-2019.7/lib/python3.6/distutils/file_util.py", line 158, in copy_file
os.utime(dst, (st[ST_ATIME], st[ST_MTIME]))
PermissionError: [Errno 1] Operation not permitted

Hi @RitaHou2018,

It looks like you're using an older version of QIIME 2 that is no longer supported (qiime2-2019.7). Can you please install our latest release version (2021.4) and try again? Hopefully this will resolve the issue you're running into!

Hi, I installed the latest release version (2021.4)](Installing QIIME 2 — QIIME 2 2021.4.0 documentation) and it works now.
Thanks a bunch!

1 Like