'<' not supported between instances of 'Mesh' and 'Mesh' Error

We can’t debug your code if you don’t provide a MWE. See here.

It’s likely that w1 and w2 belong to a different mesh.