MaxForceErrorHandler: Custodian version control issue


I’ve been slowly learning atomate and running workflows, and I noticed a potential problem with the latest update of custodian. I installed atomate using mamba in the middle of May and I use a mamba environment to run atomate. The installed versions of relevant packages are as follows:

  • atomate 1.0.3
  • python 3.9.16
  • fireworks 2.0.3
  • pymatgen 2022.0.10

When first installed, the custodian version was as follows:

  • custodian 2023.5.12

When trying to add a workflow to the launchpad via python or with the atwf command, I get the following error:

Traceback (most recent call last):
  File "/scratch/09341/jamesgil/atomate_test/band/", line 5, in <module>
    from atomate.vasp.workflows.presets.core import wf_bandstructure
  File "/home1/09341/jamesgil/mambaforge/envs/atomate_env2/lib/python3.9/site-packages/atomate/vasp/workflows/", line 1, in <module>
    from .presets.core import (
  File "/home1/09341/jamesgil/mambaforge/envs/atomate_env2/lib/python3.9/site-packages/atomate/vasp/workflows/presets/", line 14, in <module>
    from atomate.vasp.powerups import (
  File "/home1/09341/jamesgil/mambaforge/envs/atomate_env2/lib/python3.9/site-packages/atomate/vasp/", line 21, in <module>
    from atomate.vasp.firetasks.glue_tasks import CheckBandgap, CheckStability
  File "/home1/09341/jamesgil/mambaforge/envs/atomate_env2/lib/python3.9/site-packages/atomate/vasp/firetasks/", line 30, in <module>
    from .run_calc import (
  File "/home1/09341/jamesgil/mambaforge/envs/atomate_env2/lib/python3.9/site-packages/atomate/vasp/firetasks/", line 11, in <module>
    from custodian.vasp.handlers import (
ImportError: cannot import name 'MaxForceErrorHandler' from 'custodian.vasp.handlers' (/home1/09341/jamesgil/mambaforge/envs/atomate_env2/lib/python3.9/site-packages/custodian/vasp/

However, when I downgrade to custodian 2023.3.10, everything works completely fine and I’m able to add workflows and run them like normal.

Looking at the traceback and opening the file, there is, in fact, no MaxForceErrorHandler class, but it is still called upon in atomate/vasp/firetasks/ If this is a version control problem on my end, then if someone has suggestions for package updates then I’d appreciate it. However, seeing as the custodian version is SO new, I figured this may be a development issue.


@jamesgil it looks like deprecated handlers like MaxForceErrorHandler have been removed in the latest version of custodian. The atomate developers would have to implement the according changes. Tagging @arosen to provide more details if needed.

The changes on the MaxForceErrorHandler in atomate appear to still not be implemented, which unfortunately prevents me from using the most updated version of custodian - the updates to custodian resolve a bug I’ve been encountering for awhile. Do you or @arosen know anything about progress made on this regard? I’ve checked for updates to atomate, but there don’t appear to be any new versions past 1.0.3.

I don’t know much about the development status of atomate. Due to the presence of atomate2, I doubt people are actively updating atomate1. If you want it fixed, you’ll probably need to submit a PR yourself.

1 Like