KarchinLab / open-cravat

A modular annotation tool for genomic variants
MIT License
110 stars 27 forks source link

TypeError: argument of type 'NoneType' is not iterable #192

Closed tkmamidi closed 6 months ago

tkmamidi commented 9 months ago

I'm trying to run openCravat using nextflow and a lot of jobs in our HPC are failing with this error. However, some jobs are working fine. I'm not sure what is happening. They're all using the same conda environment where openCravat 2.4.1 is installed.

ERROR
module 'cravat.constants' has no attribute 'default_modules_dir'
Repeat command with --debug for more details
Traceback (most recent call last):
  File "/home/tmamidi/.local/bin/oc", line 5, in <module>
    from cravat.oc import main
  File "/home/tmamidi/.local/lib/python3.11/site-packages/cravat/__init__.py", line 41, in <module>
    from .base_annotator import BaseAnnotator
  File "/home/tmamidi/.local/lib/python3.11/site-packages/cravat/base_annotator.py", line 6, in <module>
    from .inout import CravatReader
  File "/home/tmamidi/.local/lib/python3.11/site-packages/cravat/inout.py", line 10, in <module>
    from cravat.util import detect_encoding
  File "/home/tmamidi/.local/lib/python3.11/site-packages/cravat/util.py", line 12, in <module>
    from cravat.cravat_util import max_version_supported_for_migration
  File "/home/tmamidi/.local/lib/python3.11/site-packages/cravat/cravat_util.py", line 3, in <module>
    import cravat.constants as constants
  File "/home/tmamidi/.local/lib/python3.11/site-packages/cravat/constants.py", line 52, in <module>
    if not modules_dir_key in conf:
           ^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

Please help!

kmoad commented 9 months ago

I think this is an issue with the system not being able to find the config file. Nextflow and other workflow engines can be strange with how they store that kind of data. Can you share what the nextflow wrapper configuration is? The opencravat docker container will look for config files in /mnt/config in the container.

tkmamidi commented 6 months ago

Looks like it didn't find the environment file that installs OpenCRAVAT. It is working now!