I have a function operation in a dialect and when I try to create a block inside the operation using python bindings I get the following error:
Assertion failed: (isolatedOp->hasTrait<OpTrait::IsIsolatedFromAbove>() && "Intended to check IsolatedFromAbove ops"), function verifyIsIsolatedFromAbove, file Operation.cpp, line 1078.
Well actually at HEAD it is line 1262 so you seem to be using an old version of MLIR.
Since you mention Python, I suspect you have multiple shared libraries involved in building the bindings, and they are statically some pieces of MLIR leading to ODR issues.