Traceback (most recent call last):
File "dlscore.py", line 2467, in
output = ds.get_output()
File "dlscore.py", line 2408, in get_output
score=calculate_score(lig_array, receptor, input_parameters, self.nb_nets, temp_filename, rec, "\t")
File "dlscore.py", line 2289, in calculate_score
for dl_net in dl_nets(nb_nets):
File "dlscore.py", line 152, in dl_nets
loaded_model.load_weights(os.path.join(networks_dir, weight))
File "/mnt/sda1/Shared_folder/DLSCORE-master/.venv/lib/python3.6/site-packages/keras/engine/network.py", line 1180, in load_weights
f, self.layers, reshape=reshape)
File "/mnt/sda1/Shared_folder/DLSCORE-master/.venv/lib/python3.6/site-packages/keras/engine/saving.py", line 875, in load_weights_from_hdf5_group
original_keras_version = f.attrs['keras_version'].decode('utf8')
AttributeError: 'str' object has no attribute 'decode'
Lines 874-881 of file "saving.py" show:
:
if 'keras_version' in f.attrs:
original_keras_version = f.attrs['keras_version'].decode('utf8')
else:
original_keras_version = '1'
if 'backend' in f.attrs:
original_backend = f.attrs['backend'].decode('utf8')
else:
original_backend = None
:
but if I change both if statements to
:
if 'keras_version' in f.attrs:
original_keras_version = '1'
else:
original_keras_version = '1'
if 'backend' in f.attrs:
original_backend = None
else:
original_backend = None
:
then the calculation gets to the end giving the output:
My question: the changes made to the file saving.py might alter or affect the results of DLScore in any way or can I safely use the software in this way? I understand that the modified lines are only querying the keras and backend versions, so it might be that this is not so important for DLScore execution, is it?
Hello, I have just download and tried DLScore. When trying to run the test file to check that everything is ok, I got the following error:
Traceback (most recent call last): File "dlscore.py", line 2467, in
output = ds.get_output()
File "dlscore.py", line 2408, in get_output
score=calculate_score(lig_array, receptor, input_parameters, self.nb_nets, temp_filename, rec, "\t")
File "dlscore.py", line 2289, in calculate_score
for dl_net in dl_nets(nb_nets):
File "dlscore.py", line 152, in dl_nets
loaded_model.load_weights(os.path.join(networks_dir, weight))
File "/mnt/sda1/Shared_folder/DLSCORE-master/.venv/lib/python3.6/site-packages/keras/engine/network.py", line 1180, in load_weights
f, self.layers, reshape=reshape)
File "/mnt/sda1/Shared_folder/DLSCORE-master/.venv/lib/python3.6/site-packages/keras/engine/saving.py", line 875, in load_weights_from_hdf5_group
original_keras_version = f.attrs['keras_version'].decode('utf8')
AttributeError: 'str' object has no attribute 'decode'
Lines 874-881 of file "saving.py" show:
: if 'keras_version' in f.attrs: original_keras_version = f.attrs['keras_version'].decode('utf8') else: original_keras_version = '1' if 'backend' in f.attrs: original_backend = f.attrs['backend'].decode('utf8') else: original_backend = None :
but if I change both if statements to
: if 'keras_version' in f.attrs: original_keras_version = '1' else: original_keras_version = '1' if 'backend' in f.attrs: original_backend = None else: original_backend = None :
then the calculation gets to the end giving the output:
DLSCORE OUTPUT: [{'vina_output': -6.7202, 'nnscore': 4.810024302277946, 'dlscore': 5.851217412948609}]
which I guess is OK.
My question: the changes made to the file saving.py might alter or affect the results of DLScore in any way or can I safely use the software in this way? I understand that the modified lines are only querying the keras and backend versions, so it might be that this is not so important for DLScore execution, is it?
Thanks for your comments.
Jordi