metagenome-atlas / atlas

ATLAS - Three commands to start analyzing your metagenome data
https://metagenome-atlas.github.io/
BSD 3-Clause "New" or "Revised" License
364 stars 97 forks source link

Error in rule build_qc_report: ModuleNotFoundError: No module named 'numpy._version' #722

Closed the-eon-flux closed 2 months ago

the-eon-flux commented 2 months ago

Hi Silas,

Thank you for maintaining ATLAS all this while. :) I am getting an error (probably stupid) and cannot seem to debug it. Can you please help?

The error message should looks like this:


Error in rule build_qc_report:
    jobid: 1071
    input: SRR7947996/sequence_quality_control/read_stats/QC.zip, SRR7947997/sequence_quality_control/read_stats/QC.zip, SRR7947998/sequence_quality_control/read_stats/QC.zip, SRR7947999/sequence_quality_control/read_stats/QC.zip, SRR7948000/sequence_quality_control/read_stats/QC.zip, SRR7948001/sequence_quality_control/read_stats/QC.zip, SRR7948002/sequence_quality_control/read_stats/QC.zip, SRR7948003/sequence_quality_control/read_stats/QC.zip, SRR7948004/sequence_quality_control/read_stats/QC.zip, SRR7948005/sequence_quality_control/read_stats/QC.zip, SRR7948006/sequence_quality_control/read_stats/QC.zip, SRR7948007/sequence_quality_control/read_stats/QC.zip, SRR7948008/sequence_quality_control/read_stats/QC.zip, SRR7948009/sequence_quality_control/read_stats/QC.zip, SRR7948010/sequence_quality_control/read_stats/ ...
    output: reports/QC_report.html
    log: logs/QC/report.log (check log file(s) for error details)
    conda-env: /home/isilon/users/o_shinde/References_local/ATLAS_ref/conda_envs/7828e8bdcb4de8a957df391d07859626_

The log: logs/QC/report.log file is empty.

Here is the relevant log output:

The cluster log is the same as this: Cluster_log_slurm-709003.log


Traceback (most recent call last):
  File "/home/isilon/users/o_shinde/References_local/ATLAS_ref/conda_envs/7828e8bdcb4de8a957df391d07859626_/lib/python3.9/site-packages/numpy/__init__.py", line 125, in <module>
    from numpy.__config__ import show as show_config
  File "/home/isilon/users/o_shinde/References_local/ATLAS_ref/conda_envs/7828e8bdcb4de8a957df391d07859626_/lib/python3.9/site-packages/numpy/__config__.py", line 4, in <module>
    from numpy.core._multiarray_umath import (
  File "/home/isilon/users/o_shinde/References_local/ATLAS_ref/conda_envs/7828e8bdcb4de8a957df391d07859626_/lib/python3.9/site-packages/numpy/core/__init__.py", line 9, in <module>
    from numpy.version import version as __version__
  File "/home/isilon/users/o_shinde/References_local/ATLAS_ref/conda_envs/7828e8bdcb4de8a957df391d07859626_/lib/python3.9/site-packages/numpy/version.py", line 3, in <module>
    from ._version import get_versions
ModuleNotFoundError: No module named 'numpy._version'

Traceback (most recent call last):
  File "/home/isilon/ag_cme/o_shinde/Batch_LRTB5_PRJNA494034/.snakemake/scripts/tmpeo76c93i.qc_report.py", line 3, in <module>
    import sys; sys.path.extend(['/home/gpfs/o_shinde/Softwares_Tejus/conda_mamba/envs/atlas_v2.18/lib/python3.10/site-packages', '/home/gpfs/o_shinde/.cache/snakemake/snakemake/source-cache/runtime-cache/tmpcbb7ljwz/file/home/gpfs/o_shinde/Softwares_Tejus/conda_mamba/envs/atlas_v2.18/lib/python3.10/site-packages/atlas/workflow/rules/../report', ...

../conda_mamba/envs/atlas_v2.18/lib/python3.10/site-packages/atlas/workflow/rules/../report\x94ub.'); from snakemake.logging import logger; logger.printshellcmds = False; __real_file__ = __file__; __file__ = '/home/gpfs/o_shinde/Softwares_Tejus/conda_mamba/envs/atlas_v2.18/lib/python3.10/site-packages/atlas/workflow/report/qc_report.py';
  File "/home/isilon/users/o_shinde/References_local/ATLAS_ref/conda_envs/7828e8bdcb4de8a957df391d07859626_/lib/python3.9/site-packages/numpy/__init__.py", line 130, in <module>
    raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
        its source directory; please exit the numpy source tree, and relaunch
        your python interpreter from there.

Atlas version: atlas, version 2.18.0 Additional context

Please recommend a workaround/solution for this.

the-eon-flux commented 2 months ago

Never mind. I found the problem. I had made a copy of the ATLAS reference files (genome indexes, databases, etc including the conda env paths). The cluster configuration didn't allow using the other path. I changed it back to the original one and it works now.

SilasK commented 2 months ago

thank you for posting anyway.