Salome python dump

Hello, anyone having problem with python dump? For some reason it stopped working a few months ago. I don’t know if it is because of windows 11.

All I did was import mesh, dump study, load script.

Traceback (most recent call last):
File “”, line 1, in
File “Y:/home/jacob/ASTER_WORK_UBUNTU/aaa.py”, line 26, in
([SHAFT], status) = smesh.CreateMeshesFromMED( r’/home/jacob/ASTER_WORK_UBUNTU/SHAFT.med’ )
File “C:\Users\jacob\Desktop\SSSS\W64\SMESH\lib\python3.6\site-packages\salome\salome\smesh\smeshBuilder.py”, line 700, in CreateMeshesFromMED
aSmeshMeshes, aStatus = SMESH.objref_SMESH_Gen.CreateMeshesFromMED(self,theFileName)
File “C:\Users\jacob\Desktop\SSSS\W64\SMESH\bin\salome\SMESH_Gen_idl.py”, line 423, in CreateMeshesFromMED
return self.
obj.invoke(“CreateMeshesFromMED”, *0_SMESH.SMESH_Gen.*d_CreateMeshesFromMED, args)
SALOME.SALOME_Exception: SALOME.SALOME_Exception(details=SALOME.ExceptionStruct(type=BAD_PARAM, text=‘Systém nemù\x9ee nalézt uvedený soubor’, sourceFile=‘E:\S\SALOME-9.12.0\SOURCES\SMESH\src\SMESH_I\SMESH_Gen_i.cxx’, lineNumber=1346))

can you upload following the mesh to be imported, and the dumped script, such that we can check if we can reproduce the reported issue on our side.
thanks

aaaa.py (1.4 KB)
ML_box___2___.med (92.8 KB)

I could successfully upload the .med file, dump the study and upload the dumped script. I don’t have windows 11 at hand, maybe someone else does have windows 11 could give it a try to check on his side and report directly here.
regards

yntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape

This happens even when loading empty script

hm I had to disable

smesh = smeshBuilder.New()
#smesh.SetEnablePublish( False ) # Set to False to avoid publish in study if not needed or in some particular situations:
# multiples meshes built in parallel, complex and numerous mesh edition (performance)

it still complains about the unicode but it works

This is because of \U in C:\Users which is interpreted as the beginning for a unicode character. It will work if you export to another folder.
Normally the “r” before the opening quote should fix the issue.
Otherwise you can double the '' or replace them by ‘/’.