Personal tools
You are here: Home Forum Extension of the platform Help need for porting plugin to 9.2.0 version

Help need for porting plugin to 9.2.0 version

Up to Extension of the platform

Help need for porting plugin to 9.2.0 version

Posted by Christophe Trophime at January 30. 2019

Hi,
I'm trying to port a custom plugin from Salome 8.5.0 to 9.2.0.
I run into this error:

Traceback (most recent call last):

  File "/home/LNCMI-G/trophime/Salome_Packages/SALOME-9.2.0-DBtesting/INSTALL/HIFIMAGNET/bin/salome/HIFIMAGNETGUI.py", line 284, in activate

    ctx = _setContext(_getStudyId())

  File "/home/LNCMI-G/trophime/Salome_Packages/SALOME-9.2.0-DBtesting/INSTALL/HIFIMAGNET/bin/salome/HIFIMAGNETGUI.py", line 199, in _getStudyId

    return sgPyQt.getStudyId()

AttributeError: 'SalomePyQt' object has no attribute 'getStudyId'

th. 140603218276160 - Trace /home/feelpp/salome/SALOME-9.2.0-DBtesting/SOURCES/GUI/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_PyInterp.cxx [52] : SALOME_PYQT_PyInterp::initPython - does nothing

 
Where can I find docs for the migration besides the "rudimentary" info in the release notes?
Where can I find an example of a "basic" plugin for 9.2.0?

Best
C

Re: Help need for porting plugin to 9.2.0 version

Posted by Vadim SANDLER at January 30. 2019

Hello Christophe,

Unfortunately, there is no such guide.

However, you can get an idea what should be done by looking at changes done, for instance, in PYHELLO module (as mentioned _setContext() obviously was taken from there).

https://git.salome-platform.org/gitweb/?p=samples/pyhello.git

Regards,
Vadim.

Re: Help need for porting plugin to 9.2.0 version

Posted by Mattia at January 30. 2019

It is possible the error rises due to Salome switching from multi-study to single-study mode

I think 9.2 version of SalomePyQt doesn't have getStudyId method anymore as it's now pointless.

Try to comment out getStudyId call and check if you can get context (ctx) otherwise.

Powered by Ploneboard
Document Actions