Error in atexit._run_exitfuncs

Hello! I am fairly new to computational work so I apologize in advance. The computer I am using is a MacBook Pro M2, Ventura 13.6.2 with the qiime2-2023.7 version installed via miniconda3.

The error I am getting reoccurs no matter which qiime2 command I am running. So far these are the following commands I have run with the error:

qiime tools import \
  --type 'SampleData[SequencesWithQuality]' \
  --input-path new \
  --input-format CasavaOneEightSingleLanePerSampleDirFmt \
  --output-path demux-single-end.qza
qiime dada2 denoise-single \
  --i-demultiplexed-seqs demux-single-end.qza \
  --p-trunc-len 0 \
  --o-representative-sequences rep-seqs-dada2.qza \
  --o-table table-dada2.qza \
  --o-denoising-stats stats-dada2.qza
qiime feature-table tabulate-seqs \
  --i-data rep-seqs-dada2.qza \
  --o-visualization rep-seqs-dada2.qzv
qiime tools view rep-seqs-dada2.qzv 

Here is the error message I get along with an example command:

(qiime2-2023.7) pwgallag@H77GCQV40M test % qiime tools import \
  --type 'SampleData[SequencesWithQuality]' \
  --input-path new \
  --input-format CasavaOneEightSingleLanePerSampleDirFmt \
  --output-path demux-single-end.qza
Imported new as CasavaOneEightSingleLanePerSampleDirFmt to demux-single-end.qza
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/Users/pwgallag/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/qiime2/core/cache.py", line 240, in _exit_cleanup
    cache.garbage_collection()
  File "/Users/pwgallag/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/qiime2/core/cache.py", line 724, in garbage_collection
    assert is_uuid4(data)
AssertionError

All of the output files, in this case demux-single-end.qza, seem to be functional, aren't empty, and can be used in the following command. I would just like to know if something will happen to my data or machine if I continue with this error further in my pipeline.

Hello @pwgallag, can you run ls $TMPDIR/qiime2/<your username>/data and post the results here?

Thank you

1 Like

Here is the results of that command:

(qiime2-2023.7) pwgallag@H77GCQV40M test % ls $TMPDIR/qiime2/pwgallag/data           
7b761709-e339-408b-bd21-d0b88b90c6d9	9a7eb5b1-06c4-473c-a7a7-7e916c17a8e8
1 Like

Sorry, can you actually make that an ls -al on that directory please?

No problem, is this what you were looking for?

(qiime2-2023.7) pwgallag@H77GCQV40M test % ls -al $TMPDIR/qiime2/pwgallag/data
total 16
drwxr-xr-x  5 pwgallag  staff   160 Dec  6 18:14 .
drwxr-xr-x  8 pwgallag  staff   256 Dec  6 18:14 ..
-rw-r--r--@ 1 pwgallag  staff  6148 Dec  6 18:14 .DS_Store
drwxr-xr-x  8 pwgallag  staff   256 Dec  6 18:14 7b761709-e339-408b-bd21-d0b88b90c6d9
drwxr-xr-x  7 pwgallag  staff   224 Dec  6 18:14 9a7eb5b1-06c4-473c-a7a7-7e916c17a8e8

Yes, thank you. I was looking for anything that wasn't an artifact. I had suspected it would be .DS_Store.

So I think what's happening here is when your QIIME 2 action exits it goes to clean up the temporary files it wrote that aren't needed anymore. To keep it simple, it's looking through that data directory and removing any artifacts in there that are no longer needed, but it's only expecting to find artifacts in there. It's finding your .DS_Store and freaking out because it found something that wasn't an artifact. I'm kind of shocked we hadn't run into this before honestly.

Can you please delete the .DS_Store in that directory then run qiime tools cache-garbage-collection --cache $TMPDIR/qiime2/<username>. That will run the cleanup code that QIIME 2 is running when your actions exit. If I'm correct you shouldn't get that assertion failure anymore.

3 Likes

Amazing, thank you so much! Here is the result for future reference :smile:

(qiime2-2023.7) pwgallag@H77GCQV40M data % rm .DS_Store 
(qiime2-2023.7) pwgallag@H77GCQV40M data % ls -al      
total 0
drwxr-xr-x  4 pwgallag  staff  128 Dec  7 15:19 .
drwxr-xr-x  8 pwgallag  staff  256 Dec  6 18:14 ..
drwxr-xr-x  8 pwgallag  staff  256 Dec  6 18:14 7b761709-e339-408b-bd21-d0b88b90c6d9
drwxr-xr-x  7 pwgallag  staff  224 Dec  6 18:14 9a7eb5b1-06c4-473c-a7a7-7e916c17a8e8
(qiime2-2023.7) pwgallag@H77GCQV40M data % qiime tools cache-garbage-collection --cache $TMPDIR/qiime2/pwgallag  
Ran garbage collection on cache at '/var/folders/5j/9_92hvqd4qv8sp6dsybgc9h40000gr/T//qiime2/pwgallag'
(qiime2-2023.7) pwgallag@H77GCQV40M test % qiime tools import \
  --type 'SampleData[SequencesWithQuality]' \
  --input-path new \
  --input-format CasavaOneEightSingleLanePerSampleDirFmt \
  --output-path demux-single-end.qza
Imported new as CasavaOneEightSingleLanePerSampleDirFmt to demux-single-end.qza

Thank you again for all your help!

1 Like

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