I had the same problem (outside python, but same error). I have tried almost everything suggested through the forum (cleaning temp, check process extent, check if same spatial reference, short and root folders and file names, copying feature to another shapefile). Nothing worked. But I didn't try shapefiles generated differently from the one I have. My workaround was to transform the outer wall polygon into lines and use it as inner walls.
... View more