DumpStudy to python script causes problem

Hey everyone,

I have a problem using the dumpstudy feature in Salome.

The objective is to generate a geometry in shaper, then create a 2D surface mesh for later use in cfMesh for OpenFoam.

However, when generating the python script using the dumpStudy routine and later trying to build the geometry and mesh using the python script, I get the following error:

Warning, no type found for resource "localhost", using default value "single_machine"
Traceback (most recent call last):
  File "/generic_tank.py", line 169, in <module>
    Revolution_1_1, walls, top, feature_edges, = SHAPERSTUDY.shape(model.featureStringId(Revolution_1))
TypeError: cannot unpack non-iterable NoneType object
ERROR:salomeContext:SystemExit 1 in method _sessionless.
ERROR : 10:55:37.879 : SystemExit 1 in method _sessionless. 

The error must be caused by this code block in the script:

Revolution_1_1, walls, top, feature_edges, = SHAPERSTUDY.shape(model.featureStringId(Revolution_1))

Does anybody know what to do about this? Creating the geometry and the mesh worked without any problems in the GUI but gives this error running the script.

Thank you in advance!


this means that there is no result created by the feature Revolution_1.

Activate the SHAPER module to see why. Features in error will be marked by a cross above their icon in the tree view.


Thanks for your reply.

The problem was a quite simple one. The generated script was automatically edited for a parametric study. One of the parameters was assigned a length of 0. That caused faces to not exist anymore but those faces were being called to become assigned to a group, which caused the problem.

1 Like