Hi Gregor,
I have following questions. I followed up your instruction, but I am still having some trobules. I am working on this with Salome 9.7.0 and sublime text 3.
(1) I wonder if this works only for the SALOME 9.8.0 or 9.7.0 will be fine?
(2) When I printed the system path on the CMD and on sublime text 3, the results were different. It seems that the salome environment was not fully loaded in the sublime text 3. Am I missing something and do I have to repeat Steps 1-4 everytime to use the salome environment?
(3) Due to (2), I can import salome library on CMD but failed on the sublime text 3.
(4) When I call “salome.salome_init()” I got this runtime error as follows:
import salome
salome.salome_init()
th. 00000018EC1AFC80 - Trace e:\s\salome-9.7.0\sources\kernel\src\namingservice\salome_namingservice.cxx [1410] : CORBA::SystemException: unable to contact the naming service
salome.salome_init(): Naming Service Unreacheable
============================================
May be there is no running SALOME session
salome.salome_init() is intended to be used
within an already running session
============================================
Traceback (most recent call last):
File “”, line 1, in
File “C:\SALOME-9.7.0\W64\KERNEL\lib\python3.6\site-packages\salome\salome_init_.py”, line 180, in salome_init
salome_init_with_session(path, embedded)
File “C:\SALOME-9.7.0\W64\KERNEL\lib\python3.6\site-packages\salome\salome_init_.py”, line 234, in salome_init_with_session
orb, lcc, naming_service, cm, esm, dsm, modulcat = salome_kernel_init()
File “C:\SALOME-9.7.0\W64\KERNEL\lib\python3.6\site-packages\salome\salome_kernel.py”, line 69, in salome_kernel_init
lcc = LifeCycleCORBA(orb)
File “C:\SALOME-9.7.0\W64\KERNEL\bin\salome\LifeCycleCORBA.py”, line 36, in init
SALOME_LifeCycleCORBA.init(self)
File “C:\SALOME-9.7.0\W64\KERNEL\lib\python3.6\site-packages\salome\libSALOME_LifeCycleCORBA.py”, line 175, in init
this = _libSALOME_LifeCycleCORBA.new_SALOME_LifeCycleCORBA(ns)
RuntimeError: Naming Service Unreacheable
Although this error does not happen when I call this function again, I think this error was not resolved because I got another error when I create new geomBuilder obejct.
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
import math
import SALOMEDS
geompy = geomBuilder.New()
Traceback (most recent call last):
File “”, line 1, in
File “C:\SALOME-9.7.0\W64\GEOM\lib\python3.6\site-packages\salome\salome\geom\geomBuilder.py”, line 14079, in New
geom = geomBuilder()
File “C:\SALOME-9.7.0\W64\GEOM\lib\python3.6\site-packages\salome\salome\geom\geomBuilder.py”, line 708, in new
geom = lcc.FindOrLoadComponent( “FactoryServer”, “GEOM” )
AttributeError: ‘NoneType’ object has no attribute ‘FindOrLoadComponent’
I appreciate if if you can give me any comments on the troubles I am having!
Best,
SuJong