Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Add a clearer error message for full tmpdir #217

Open
lina-kim opened this issue Nov 13, 2024 · 0 comments
Open

BUG: Add a clearer error message for full tmpdir #217

lina-kim opened this issue Nov 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@lina-kim
Copy link

Describe the bug
Not quite a bug per se (please feel free to reclassify); but the true error source resulting from classify-kraken2 could be better reported to the user.

The actual problem with my command is my full tempdir, but this is reported higher up in the traceback. The highlighted error ("It looks like you have an Artifact but are missing the plugin(s) necessary to load it") can throw off users who are not used to reading through error messages.

To reproduce
Steps to reproduce the behavior:

  1. Log onto HPC (in my case, LeoMed)
  2. Spin up an interactive job on a compute node
  3. Run a shell within a the qiime2-metagenome-2024.5 Singularity container
  4. Run classify-kraken2:
qiime moshpit classify-kraken2 \
    --i-seqs /data/sequences.qza \
    --i-kraken2-db /ref/kraken_standard.qza \
    --p-threads 4 --p-confidence 0.6 \
    --p-minimum-base-quality 20 \
    --p-report-minimizer-data \
    --p-memory-mapping False \
    --o-hits kraken_read_hits.qza \
    --o-reports kraken_read_reports.qza \
    --verbose
  1. See below error:
Traceback (most recent call last):
  File "/opt/conda/envs/qiime2-metagenome-2024.5/lib/python3.9/site-packages/qiime2/sdk/result.py", line 80, in load
    archiver = archive.Archiver.load(filepath)
  File "/opt/conda/envs/qiime2-metagenome-2024.5/lib/python3.9/site-packages/qiime2/core/archive/archiver.py", line 378, in load
    cls._destroy_temp_path(archive.uuid)
  File "/opt/conda/envs/qiime2-metagenome-2024.5/lib/python3.9/site-packages/qiime2/core/archive/archiver.py", line 301, in _destroy_te
mp_path
    cache.process_pool.remove(str(process_alias))
  File "/opt/conda/envs/qiime2-metagenome-2024.5/lib/python3.9/site-packages/qiime2/core/cache.py", line 1709, in remove
    with self.cache.lock:
  File "/opt/conda/envs/qiime2-metagenome-2024.5/lib/python3.9/site-packages/qiime2/core/cache.py", line 292, in __enter__
    self.flufl_lock.lock()
  File "/opt/conda/envs/qiime2-metagenome-2024.5/lib/python3.9/site-packages/flufl/lock/_lockfile.py", line 328, in lock
    self._write()
  File "/opt/conda/envs/qiime2-metagenome-2024.5/lib/python3.9/site-packages/flufl/lock/_lockfile.py", line 493, in _write
    fp.write(self._claimfile)
OSError: [Errno 28] No space left on device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/envs/qiime2-metagenome-2024.5/lib/python3.9/site-packages/q2cli/util.py", line 486, in _load_input_file
    artifact = qiime2.sdk.Result.load(fp)
  File "/opt/conda/envs/qiime2-metagenome-2024.5/lib/python3.9/site-packages/qiime2/sdk/result.py", line 84, in load
    raise ValueError(f'There was not enough space left on '
ValueError: There was not enough space left on '/tmp' to extract the artifact '/ref/kraken_standard.qza'. (Try setting $TMPDIR to a directory with more space, or increasing the size of '/tmp')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/conda/envs/qiime2-metagenome-2024.5/lib/python3.9/site-packages/q2cli/click/type.py", line 116, in _convert_input
    result, error = q2cli.util._load_input(value)
  File "/opt/conda/envs/qiime2-metagenome-2024.5/lib/python3.9/site-packages/q2cli/util.py", line 391, in _load_input
    artifact, error = _load_input_file(fp)
  File "/opt/conda/envs/qiime2-metagenome-2024.5/lib/python3.9/site-packages/q2cli/util.py", line 492, in _load_input_file
    raise ValueError(
ValueError: It looks like you have an Artifact but are missing the plugin(s) necessary to load it. Artifact has type 'Kraken2DB' and format 'Kraken2DBDirectoryFormat'

There was a problem loading '/ref/kraken_standard.qza' as an artifact:

  It looks like you have an Artifact but are missing the plugin(s) necessary to load it. Artifact has type 'Kraken2DB' and format 'Kraken2DBDirectoryFormat'

See above for debug info.

Expected behavior
Ideally, the exception thrown by result.py ("ValueError: There was not enough space left on '/tmp' to extract the artifact '/ref/kraken_standard.qza'. (Try setting $TMPDIR to a directory with more space, or increasing the size of '/tmp')") would be propagated as the primary end error to the user.

Please complete the following information:

  • OS: Linux (HPC)
  • QIIME 2 version: 2024.5 metagenome distribution

Thanks MOSHPIT team for the great tool! As a new metagenomics user, I am grateful for the resource with which to process my extensive shotgun data.

@lina-kim lina-kim added the bug Something isn't working label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant