Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71
Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: rB84da05a8b806
Worked: (newest version of Blender that worked as expected)
Short description of error
When attempting to bake fluid simulations via API Blender will throw a ' PyEval_EvalCodeEx: NULL globals' error when attempting to view the simulation.
Interestingly, if you set everything up with one script, and then use a second script to bake the simulation everything seems to work fine.
Exact steps for others to reproduce the error
Run the attached script in a new blender file to reproduce the error.
To see how it does work in two steps, comment line #83 to prevent baking the first time you run the script. The second time comment line #78 to avoid building the world.
As you will also see from the script file saving and updating the view_layer do not seem to help.
Thanks in advance for any help!!