We need more information to identify the problem.
If I remember correctly, this error is due to an abrupt variation of the internal energy (DGgas). Because of the mathematical formula, it generates a number so large that python does not handle it. This is mostly because the trajectory has PBC or the system is very unstable.
If it is this error, we also implement a better traceback indicating the causes in the most recent versions.