Couldn't reproduce the issue.
Can you please try it again with the latest BBIM build from Github? https://github.com/IfcOpenShell/IfcOpenShell/releases
If issue persists please send the full error traceback, it's available in Window - Toggle System Console.
I just tried with an Archicad Ifc and a different Revit Ifc. Both where working fine so there is probably something wrong with my Ifc. My bad, thank you for helping out though.
I've found a bug - it was trying to append all other elements that shared material with IfcSlabs you were trying to extract and it end up starting infinite recursion. Fixed after this commit, you can try it from the new build from Github.
Comments
Hello! Can you please show some example how to reproduce the issue?
Yes, of course.

1: Quality and Coordination tab
2: Pull down recipe
3: Choose "ExtractElements"
4: Execute IFCPatch

5: Error message
When I choose "Load from Memory" I get the same message.
Couldn't reproduce the issue.
Can you please try it again with the latest BBIM build from Github? https://github.com/IfcOpenShell/IfcOpenShell/releases
If issue persists please send the full error traceback, it's available in Window - Toggle System Console.
With the latest build still same error unfortunately.
can you please send .ifc file to test it on? seems to work fine on the projects I've tried
Yes:
I just tried with an Archicad Ifc and a different Revit Ifc. Both where working fine so there is probably something wrong with my Ifc. My bad, thank you for helping out though.
I've found a bug - it was trying to append all other elements that shared material with IfcSlabs you were trying to extract and it end up starting infinite recursion. Fixed after this commit, you can try it from the new build from Github.
Thank you for reporting this ?
Yes, it works fine now, thank you very much!