It happens that on windows we get permission errors due to the code in ocp_tessellate/ocp_utils
def deserialize(buffer):
if buffer is None:
return None
shape = TopoDS_Shape()
try:
bio = io.BytesIO(buffer)
BinTools.Read_s(shape, bio)
except Exception:
with tempfile.NamedTemporaryFile() as tf:
with open(tf.name, "wb") as fd:
fd.write(buffer)
BinTools.Read_s(shape, tf.name)
return shape
The issue comes from the fact that tf is an already opened file and we try to open it twice. The python docs says that it's platform dependent and on windows opening it twice doesnt work.
It happens that on windows we get permission errors due to the code in ocp_tessellate/ocp_utils
The issue comes from the fact that
tf
is an already opened file and we try to open it twice. The python docs says that it's platform dependent and on windows opening it twice doesnt work.