Shapely Contains function - TopologyException: side location conflict

Hi all,
I’m working with polygons and shapely library and when I run the function:

polygon1.contains(polygon2)

I obtain following error:

TopologyException: side location conflict at

Polygon1 have holes too. Can someone help me to solve this error?

thank you very much