# Issue tmp space \[Errno 28\] tools import

**URL:** <https://forum.qiime2.org/t/issue-tmp-space-errno-28-tools-import/32005>\
**Category:** Technical Support\
**Tags:** tmp\
**Created:** [November 28, 2024, 4:37pm UTC](https://forum.qiime2.org/t/issue-tmp-space-errno-28-tools-import/32005 "2024-11-28T16:37:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![msalamon2](https://forum.qiime2.org/user_avatar/forum.qiime2.org/msalamon2/32/19776_2.png) [@msalamon2](https://forum.qiime2.org/u/msalamon2)\
**Post date:** [November 28, 2024, 4:37pm UTC](https://forum.qiime2.org/t/issue-tmp-space-errno-28-tools-import/32005/1 "2024-11-28T16:37:08Z")

</div>

Hello,

I am trying to convert a midori2 database downloaded specifically in the qiime2 format (MIDORI2\_UNIQ\_NUC\_GB261\_srRNA\_QIIME.fasta) to the qiime2 archive format, but I am having issues with space in the tmp folder. I saw that there was many discussions on this topic on the forum and I went through them but couldn't find a solution that worked. I am running Qiime2 on a computing cluster from the digital reasearch alliance of Canada.

Here are the commands I used and the error message I got:

#SBATCH --mem=150G  
#SBATCH --cpus-per-task=31  
#SBATCH --time=2:00:00  
#SBATCH --account=def-mcristes  
#SBATCH --mail-type=ALL

module load StdEnv/2023 qiime2/2024.5

cd /home/msalamon/projects/def-mcristes/msalamon/scripts/QIIME2\_taxonomy/12SMimammal/  
export TMPDIR='/home/msalamon/AMPtk/TEMP/'

qiime tools import   
--input-path /lustre03/project/6006581/msalamon/scripts/QIIME2\_taxonomy/12SMimammal/MIDORI2\_UNIQ\_NUC\_GB261\_srRNA\_QIIME.fasta   
--output-path /lustre03/project/6006581/msalamon/scripts/QIIME2\_taxonomy/12SMimammal/MIDORI2\_UNIQ\_NUC\_GB261\_srRNA\_QIIME.fasta.qza   
--type 'FeatureData[Sequence]'

Matplotlib created a temporary cache directory at /tmp/matplotlib-qra2psto because the default path (/home/qiime2/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDI\>  
Traceback (most recent call last):  
File "/opt/conda/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/q2cli/builtin/tools.py", line 852, in \_import  
artifact = qiime2.sdk.Artifact.import\_data(  
File "/opt/conda/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/qiime2/sdk/result.py", line 332, in import\_data  
return cls._from\_view(type_, view, view\_type, provenance\_capture,  
File "/opt/conda/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/qiime2/sdk/result.py", line 360, in \_from\_view  
result = transformation(view, validate\_level)  
File "/opt/conda/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/qiime2/core/transform.py", line 70, in transformation  
new\_view = transformer(view)  
File "/opt/conda/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/qiime2/core/transform.py", line 224, in wrapped  
new\_view.file.write\_data(file\_view, self.\_wrapped\_view\_type)  
File "/opt/conda/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/qiime2/plugin/model/directory\_format.py", line 93, in write\_data  
result.path.\_move\_or\_copy(self.path\_maker(\*\*kwargs))  
File "/opt/conda/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/qiime2/core/path.py", line 45, in \_move\_or\_copy  
return self.\_copy\_dir\_or\_file(other)  
File "/opt/conda/envs/qiime2-amplicon-2024.5/lib/python3.9/site-packages/qiime2/core/path.py", line 35, in \_copy\_dir\_or\_file  
return shutil.copy(str(self), str(other))  
File "/opt/conda/envs/qiime2-amplicon-2024.5/lib/python3.9/shutil.py", line 427, in copy  
copyfile(src, dst, follow\_symlinks=follow\_symlinks)  
File "/opt/conda/envs/qiime2-amplicon-2024.5/lib/python3.9/shutil.py", line 277, in copyfile  
\_fastcopy\_sendfile(fsrc, fdst)  
File "/opt/conda/envs/qiime2-amplicon-2024.5/lib/python3.9/shutil.py", line 166, in \_fastcopy\_sendfile  
raise err from None  
File "/opt/conda/envs/qiime2-amplicon-2024.5/lib/python3.9/shutil.py", line 152, in \_fastcopy\_sendfile  
sent = os.sendfile(outfd, infd, offset, blocksize)  
OSError: [Errno 28] No space left on device: '/lustre03/project/6006581/msalamon/scripts/QIIME2\_taxonomy/12SMimammal/MIDORI2\_UNIQ\_NUC\_GB261\_srRNA\_QIIME.fasta' -\> '/tmp/q2-DNASequencesDirectoryFormat-qzk\>

An unexpected error has occurred:

[Errno 28] No space left on device: '/lustre03/project/6006581/msalamon/scripts/QIIME2\_taxonomy/12SMimammal/MIDORI2\_UNIQ\_NUC\_GB261\_srRNA\_QIIME.fasta' -\> '/tmp/q2-DNASequencesDirectoryFormat-qzkf0v3f/d\>

See above for debug info.  
Matplotlib created a temporary cache directory at /tmp/matplotlib-z8hrb7fq because the default path (/home/qiime2/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDI\>  
Usage: qiime feature-classifier classify-consensus-vsearch  
(1/1) Invalid value for '--i-reference-reads': /lustre03/project/6006581/msal  
amon/scripts/QIIME2\_taxonomy/12SMimammal/MIDORI2\_UNIQ\_NUC\_GB261\_srRNA\_QIIME.  
fasta.qza does not exist.

I tried changing the TMPDIR in different ways to other directories including in the home directory which should have sufficient space:  
export TMPDIR=$SLURM\_TMPDIR

or

cd /home/msalamon/projects/def-mcristes/msalamon/scripts/QIIME2\_taxonomy/12SMimammal/  
mkdir -p TEMP  
export TMPDIR='/home/msalamon/projects/def-mcristes/msalamon/scripts/QIIME2\_taxonomy/12SMimammal/TEMP'

However I still got the same error message, so it doesn't seem like I was able to change the tmp directory. I also tried increasing the memory to 150G (the fasta file itself is ~110MB) but this didn't change the issue.

Thank you for your help,  
Mathilde Salamon

---

<div class="post-metadata">

**Author:** ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)\
**Post date:** [December 2, 2024, 5:46pm UTC](https://forum.qiime2.org/t/issue-tmp-space-errno-28-tools-import/32005/2 "2024-12-02T17:46:44Z")

</div>

Hello @msalamon2,

Welcome to the forums! :qiime2:

Thank you for your detailed post. It looks like you are setting `TMPDIR` correctly:

```plaintext
export TMPDIR=$SLURM_TMPDIR

or

cd /home/msalamon/projects/def-mcristes/msalamon/scripts/QIIME2_taxonomy/12SMimammal/
mkdir -p TEMP
export TMPDIR='/home/msalamon/projects/def-mcristes/msalamon/scripts/QIIME2_taxonomy/12SMimammal/TEMP'

```

and yet...

> Matplotlib created a temporary cache directory at /tmp/matplotlib-qra2psto because the default path (/home/qiime2/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDI\>

> [Errno 28] No space left on device: '/lustre03/project/6006581/msalamon/scripts/QIIME2\_taxonomy/12SMimammal/MIDORI2\_UNIQ\_NUC\_GB261\_srRNA\_QIIME.fasta' -\> '/tmp/q2-DNASequencesDirectoryFormat-qzkf0v3f/d\>

Maybe you could try reading and files from the TMPDIR?

```sh
echo $TMPDIR
touch $TMPDIR/test1.txt
ls $TMPDIR

```

If that all works, I think it's time to bring this to your cluster admins. They will know if there is a special way you pass environment variables or something when you run this on the queue.

If you figure this out, let us know! That will help future users!

---

<div class="post-metadata">

**Author:** ![msalamon2](https://forum.qiime2.org/user_avatar/forum.qiime2.org/msalamon2/32/19776_2.png) [@msalamon2](https://forum.qiime2.org/u/msalamon2)\
**Post date:** [December 6, 2024, 4:47pm UTC](https://forum.qiime2.org/t/issue-tmp-space-errno-28-tools-import/32005/3 "2024-12-06T16:47:12Z")

</div>

Hello @colinbrislawn,

thank you for your reply. The tech support from the computing cluster were able to solve the issue with apptainer. The solution was:

salloc --mem=50G

cd /home/msalamon/projects/def-mcristes/msalamon/scripts/QIIME2\_taxonomy/12SMimammal/

# [Appendix — Apptainer User Guide main documentation](https://apptainer.org/docs/user/main/appendix.html)

# Bind source:destination, bind current directory to /data

export APPTAINER\_BIND=$PWD:/data

# Set the working directory to be used for /tmp, /var/tmp and $HOME

export APPTAINER\_WORKDIR=$SLURM\_TMPDIR

module load StdEnv/2023 qiime2/2024.5

# run with /data mounted

qiime tools import   
--input-path /data/MIDORI2\_UNIQ\_NUC\_GB261\_srRNA\_QIIME.fasta   
--output-path /data/MIDORI2\_UNIQ\_NUC\_GB261\_srRNA\_QIIME.fasta.qza   
--type 'FeatureData[Sequence]'

I hope this can help other users !

---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [January 6, 2025, 10:47pm UTC](https://forum.qiime2.org/t/issue-tmp-space-errno-28-tools-import/32005/4 "2025-01-06T22:47:48Z")

</div>

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