DeepRank / deeprank

This repository has been integrated in https://github.com/DeepRank/deeprank2
Apache License 2.0
145 stars 27 forks source link

DataGenerator crashes when no "pssm_source" is provided #240

Open DarioMarzella opened 3 years ago

DarioMarzella commented 3 years ago

Describe the bug DataGenerator crashes when no "pssm_source" is provided

Environment:

To Reproduce Steps/commands to reproduce the behaviour:

  1. Create a DataGenerator object, do not specify "pssm_souce" in it
  2. Run the script

Actual Results or Error Info

Traceback (most recent call last): File "/srv/home2/dariom/deeprank_edesolv/./Edesolv/generate_dataset.py", line 55, in database.create_database(prog_bar=False) File "/srv/home2/dariom/deeprank_edesolv/deeprank/generate/DataGenerator.py", line 253, in create_database self.f5.attrs['pssm_source'] = os.path.abspath( File "/home/dariom/anaconda3/envs/3D-EP/lib/python3.9/posixpath.py", line 374, in abspath path = os.fspath(path) TypeError: expected str, bytes or os.PathLike object, not NoneType

Additional Context The problem is raised in deeprank/generate/DataGenerator.py, line 253. Can be fixed by simply adding the following line:

if self.pssm_source is not None: