Deadlock When Importing Modules in the “Calc Results by Python” Step
Symptom:
When the script run by the “Calc Results by Python” Step imported a module, the following error message appeared when the Step was executed: DeadlockError: deadlock detected
.
Possible Cause:
When importing modules in Python, locks are acquired sequentially along the module chain, and the corresponding C extension modules are called. If there are circular dependencies during the import process, the module locks may wait for each other, which can result in a deadlock.
Workaround:
Move the call of the relevant module earlier in the execution order.