KeenThera / SECSE

Systemic Evolutionary Chemical Space Exploration for Drug Discovery
Apache License 2.0
79 stars 18 forks source link

TypeError: expected str, bytes or os.PathLike object, not NoneType #10

Closed alyferryhalo closed 9 months ago

alyferryhalo commented 9 months ago

After running demo via command python run_secse.py --config /Users/alisagorislav/Documents/SECSE/demo/phgdh_demo_vina.ini I got an error:

Traceback (most recent call last):
  File "/Users/alisagorislav/Documents/SECSE/secse/run_secse.py", line 12, in <module>
    from grow_processes import Grow
  File "/Users/alisagorislav/Documents/SECSE/secse/grow_processes.py", line 15, in <module>
    from growing.mutation.mutation import mutation_df
  File "/Users/alisagorislav/Documents/SECSE/secse/growing/mutation/mutation.py", line 18, in <module>
    RULE_DB = os.path.join(os.getenv("SECSE"), "growing/mutation/rules_demo.db")
  File "/Users/alisagorislav/opt/anaconda3/envs/secse/lib/python3.10/posixpath.py", line 76, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

How to fix it?

ChongLu121 commented 9 months ago

Hi @alyferryhalo,

It seems like the issue you're experiencing is due to the SECSE environment variable not being correctly set. This variable is essential for the script to locate necessary files. To fix this, you can set the SECSE environment variable to the correct path of your SECSE installation. Based on the file paths you've provided, you should set it like this:

export SECSE=/Users/alisagorislav/Documents/SECSE/secse/

Additionally, ensure to set vironment variable of AutoDock Vina for docking:

export VINA=/absolute/path/to/AutoDockVINA

Replace the paths with the actual location of the AutoDock Vine on your system.

You can add this line to your shell's startup script (like .bashrc or .zshrc) to make this change permanent. After setting this, try running the script again:

python run_secse.py --config /Users/alisagorislav/Documents/SECSE/demo/phgdh_demo_vina.ini

Best, Chong