Skip to content

'Directory not empty' Error when running demo #13

@zehanna

Description

@zehanna

Hi David,

thank you for developing this really nice tool.

After installing it on a new server, I ran into the following error while trying to run the demo:

Command:
python3 prediction_pipeline.py ../data/prediction_demo/regression_models/ genomes_retrieved.txt species_taxonomic.txt

Error:

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/cluster/project/umbiol/software/miniconda3/envs/ogt_pred_env/lib/python3.13/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
                    ~~~~^^^^^^^^^^^^^^^
  File "/cluster/project/umbiol/software/miniconda3/envs/ogt_pred_env/lib/python3.13/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/cluster/project/umbiol/software/OGT_prediction/prediction/genome_analysis.py", line 62, in features_per_genome
    external_tools.cleanup((genome_file,species))
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/cluster/project/umbiol/software/OGT_prediction/prediction/external_tools.py", line 78, in cleanup
    shutil.rmtree('./output/genomes/'+species+'/'+folder)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cluster/project/umbiol/software/miniconda3/envs/ogt_pred_env/lib/python3.13/shutil.py", line 763, in rmtree
    _rmtree_safe_fd(stack, onexc)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/cluster/project/umbiol/software/miniconda3/envs/ogt_pred_env/lib/python3.13/shutil.py", line 707, in _rmtree_safe_fd
    onexc(func, path, err)
    ~~~~~^^^^^^^^^^^^^^^^^
  File "/cluster/project/umbiol/software/miniconda3/envs/ogt_pred_env/lib/python3.13/shutil.py", line 658, in _rmtree_safe_fd
    os.rmdir(name, dir_fd=dirfd)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 39] Directory not empty: './output/genomes/thermocrinis_ruber/Thermocrinis_ruber_ASM51273v1_dna_toplevel/barrnap'
"""

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

Traceback (most recent call last):
  File "/cluster/project/umbiol/software/OGT_prediction/prediction/prediction_pipeline.py", line 84, in <module>
    genome_features = genome_analysis.many_genomes(to_analyze)
  File "/cluster/project/umbiol/software/OGT_prediction/prediction/genome_analysis.py", line 83, in many_genomes
    results = p.map(features_per_genome, to_analyze)
  File "/cluster/project/umbiol/software/miniconda3/envs/ogt_pred_env/lib/python3.13/multiprocessing/pool.py", line 367, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/cluster/project/umbiol/software/miniconda3/envs/ogt_pred_env/lib/python3.13/multiprocessing/pool.py", line 774, in get
    raise self._value
OSError: [Errno 39] Directory not empty: './output/genomes/thermocrinis_ruber/Thermocrinis_ruber_ASM51273v1_dna_toplevel/barrnap'

It seems there is an error in the pool.py script (because the target directory is indeed empty).
Could you maybe look into it?

Thanks a lot in advance,

Hanna

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions