DataGenerator crashes when no "pssm_source" is provided
Describe the bug DataGenerator crashes when no "pssm_source" is provided
Environment:
- OS system:Linux
To Reproduce Steps/commands to reproduce the behaviour:
- Create a DataGenerator object, do not specify "pssm_souce" in it
- 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: