Dear René,
You will have to give a closer look at the function spaces you are using.
First, you are using discontinuous spaces, where continuous spaces would suffice as well: “P1” instead of “DP1”. This will reduce the number of DOFs.
The error message that is given means that the number of DOFs does not match in the blocked matrix. Specifically, all matrices in the same block column need to have the same number of columns. That is, all operators in each column of the block matrix need to have the same domain space. In your case, the third column has both a K2 and a K3 operator, which have a different number of DOFs in their domain spaces.
Actually, the same problem happens in the first and second column as well, where you use the domain spaces DS and DS2, which just happen to have exactly the same number of DOFs. Therefore, the test is passed whereas the spaces are still not compatible.
I would suggest reviewing the formulation carefully, including all function spaces.
Best,
Elwin