pymbar
pymbar copied to clipboard
NameError: name 'ConvergenceError' is not defined
In line 1963 of pymbar/pymbar/mbar.py, the code tries to catch a ConvergenceError
that is nowhere defined in that file. Hence, if that part of the code is reached, one gets a NameError
.
The simple solution is to import the ConvergenceError
from pymbar.utils
at the top of the file.
As a related question: At the same place of the code, would it also make sense to catch the pymbar.utils.BoundsError
that, as the pymbar.utils.ConvergenceError
, can be thrown by the bar
function?