Personal tools
You are here: Home Forum Other... (new forum, problems, etc.) Cannot import smeshBuilder

Cannot import smeshBuilder

Up to Other... (new forum, problems, etc.)

Cannot import smeshBuilder

Posted by Elektrix at December 27. 2016

Hello,

I have a python script that builds  a geometry and later meshes it. The script works with Salome 7.6.0 but doesn't with 7.8.0. The first commands are:

import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
import math
gg = salome.ImportComponentGUI("GEOM")

import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
smesh =  smeshBuilder.New(salome.myStudy)

This is as given in the documentation. In 7.8.0 the error message is:

p, li { white-space: pre-wrap; }

Traceback (most recent call last):

File "<input>", line 1, in <module>

File "/home/friedrich/Entwicklung/FEM/Salome/Solarspeicher/geometry_tank_diffusor_Salome_7_80.py", line 11, in <module>

smesh = smeshBuilder.New(salome.myStudy)

File "//home/friedrich/SALOME-7.8.0-OPENSOURCE-DB08/INSTALL/SMESH/lib/python2.7/site-packages/salome/salome/smesh/smeshBuilder.py", line 1194, in New

assert isinstance(smeshInst,smeshBuilder), "Smesh engine class is %s but should be smeshBuilder.smeshBuilder. Import salome.smesh.smeshBuilder before creating the instance."%smeshInst.__class__

AssertionError: Smesh engine class is <type 'NoneType'> but should be smeshBuilder.smeshBuilder. Import salome.smesh.smeshBuilder before creating the instance.

 

The smesh.Builder is not imported but why?

My system is Debian 8 stretch. I use the SALOME-7.6.0-DB07 and SALOME-7.8.0-OPENSOURCE-DB08 versions.

If anybody could give me some information on how to solve this problem it would be very helpful.

 

Thanks in advance

Elektrix

Quick reply
URLs will be automatically hyperlinked. Basic HTML tags are OK.
Powered by Ploneboard
History
Activate by Elektrix on Dec 27, 2016 09:01 PM
Document Actions