[Error 40] Too many levels of symbolic links: '16s_obj1/qiime2analysis/AM-16S-10_S17_L001_R1_001.fastq.gz'

I am using QIIME2 (2018.11 version because newest version update keeps failing) remotely installed on my account in a departmental server.

I ran the following commands to import 16S data:

qiime tools import
--type 'SampleData[PairedEndSequencesWithQuality]'
--input-path 16s_obj1
--output-path demux-paired-end.qza

I got the following error:
Traceback (most recent call last):
File "/home/aneth/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/q2cli/tools.py", line 140, in import_data
view_type=input_format)
File "/home/aneth/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2/sdk/result.py", line 233, in import_data
md5sums = util.md5sum_directory(path)
File "/home/aneth/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2/core/util.py", line 116, in md5sum_directory
sums[os.path.relpath(path, start=directory)] = md5sum(path)
File "/home/aneth/miniconda3/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2/core/util.py", line 100, in md5sum
with open(str(filepath), mode='rb') as fh:
OSError: [Errno 40] Too many levels of symbolic links: '16s_obj1/qiime2analysis/AM-16S-10_S17_L001_R1_001.fastq.gz'

An unexpected error has occurred:

[Errno 40] Too many levels of symbolic links: '16s_obj1/qiime2analysis/AM-16S-10_S17_L001_R1_001.fastq.gz'

See above for debug info.

Please help!

Hi @anethdavid,

This is a new one for me, what does:

ls -al 16s_obj1/qiime2analysis/

show (you may need ot change the path as necessary).

I'm expecting to see some symlinks (denoted with arrows between two names).

If you do see that, what does the result of running readlink -f <one of those files> do? I suspect you may have relative symlinks which will only resolve correctly if your working directory is in the exact right spot.

1 Like

Hi,

Thank you for getting back to me.

Running ls -al 16s_obj1/qiime2analysis/ gives:

total 72
drwxrwxr-x 3 aneth aneth 4096 Apr 10 10:08 .
drwxrwxr-x 3 aneth aneth 4096 Apr 10 09:54 ..
-rw-rw-r-- 1 aneth aneth 57261 Apr 10 10:09 16s_obj1_metadata.tsv
lrwxrwxrwx 1 aneth aneth 34 Apr 10 10:08 AM-16S-10_S17_L001_R1_001.fastq.gz -> AM-16S-10_S17_L001_R1_001.fastq.gz
lrwxrwxrwx 1 aneth aneth 34 Apr 10 10:08 AM-16S-10_S17_L001_R2_001.fastq.gz -> AM-16S-10_S17_L001_R2_001.fastq.gz
lrwxrwxrwx 1 aneth aneth 34 Apr 10 10:08 AM-16S-11_S18_L001_R1_001.fastq.gz -> AM-16S-11_S18_L001_R1_001.fastq.gz

The list is a bit long.

I removed the folder qiime2analysis because I had linked the data not wanting to work on original data on the parent folder, 16s_obj1. I tried to import the original unliked data and it worked. I will have to copy the data in a separate folder for storage.

1 Like

By the way, we also realised that it may be an issue with the data itself, so I deleted the data from the sever and re-uploaded it. It worked also.