You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the error
On providing an invalid file to any IJob, the traceback refers to an KeyError in selection_length rather than stating the file doesn't exist. While this is reported in the logs, so MDANSE apparantly knows.
Describe the expected result
A FileNotFoundError raised with a useful message.
Describe the actual result
Log
Could not use xxxx as input trajectory
IJob did not find 'write_logs' in output_files
Job failed with traceback: Traceback (most recent call last):
File "/home/jacob/MDANSE/MDANSE/Src/MDANSE/Framework/Jobs/IJob.py", line 395, in run
self.initialize()
File "/home/jacob/MDANSE/MDANSE/Src/MDANSE/Framework/Jobs/VelocityAutoCorrelationFunction.py", line 114, in initialize
self.numberOfSteps = self.configuration["atom_selection"]["selection_length"]
KeyError: 'selection_length'
Traceback (most recent call last):
File "/home/jacob/MDANSE/MDANSE/Src/MDANSE/Framework/Jobs/IJob.py", line 395, in run
self.initialize()
File "/home/jacob/MDANSE/MDANSE/Src/MDANSE/Framework/Jobs/VelocityAutoCorrelationFunction.py", line 114, in initialize
self.numberOfSteps = self.configuration["atom_selection"]["selection_length"]
KeyError: 'selection_length'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jacob/MDANSE/MDANSE/Tests/UnitTests/Analysis/tmp.py", line 15, in <module>
vacf.run(parameters, status=True)
File "/home/jacob/MDANSE/MDANSE/Src/MDANSE/Framework/Jobs/IJob.py", line 418, in run
raise JobError(self, tb)
MDANSE.Framework.Jobs.IJob.JobError: Traceback (most recent call last):
File "/home/jacob/MDANSE/MDANSE/Src/MDANSE/Framework/Jobs/IJob.py", line 395, in run
self.initialize()
File "/home/jacob/MDANSE/MDANSE/Src/MDANSE/Framework/Jobs/VelocityAutoCorrelationFunction.py", line 114, in initialize
self.numberOfSteps = self.configuration["atom_selection"]["selection_length"]
KeyError: 'selection_length'
Suggested fix
If trying to load a necessary file, raise early.
Description of the error
On providing an invalid file to any
IJob
, the traceback refers to anKeyError
inselection_length
rather than stating the file doesn't exist. While this is reported in the logs, so MDANSE apparantly knows.Describe the expected result
A
FileNotFoundError
raised with a useful message.Describe the actual result
Log
Suggested fix
If trying to load a necessary file,
raise
early.Additional details
MWE
The text was updated successfully, but these errors were encountered: