sbmlteam / moccasin

MOCCASIN translates basic ODE-based MATLAB models of biological processes into SBML format.
http://sbml.org/Software/MOCCASIN
Other
10 stars 2 forks source link

moccasin gui won't launch #46

Closed fbergmann closed 6 years ago

fbergmann commented 6 years ago

Trying to start the moccasin gui failes with:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
D:\Development\moccasin\moccasin\interfaces\moccasin_GUI.py in <module>()
    602         app.MainLoop()
    603
--> 604 gui_main()

D:\Development\moccasin\moccasin\interfaces\moccasin_GUI.py in gui_main()
    598 def gui_main():
    599         app = wx.App(False)
--> 600         frame = MainFrame(None)
    601         frame.Show()
    602         app.MainLoop()

D:\Development\moccasin\moccasin\interfaces\moccasin_GUI.py in __init__(self, parent)
    216                     self.statusBar = self.CreateStatusBar(5, wx.ST_SIZEGRIP|wx.ALWAYS_SHOW_SB|wx.RAISED_BORDER, wx.ID_ANY )
    217                 self.statusBar.SetFieldsCount(5)
--> 218                 wxSetToolTip( self.statusBar, "Status" )
    219                 self.statusBar.SetStatusText("Ready",0)
    220                 self.statusBar.SetStatusText('Version ' + _VERSION ,4)

D:\Development\moccasin\moccasin\interfaces\moccasin_GUI.py in wxSetToolTip(item, text)
    175         item.SetToolTip(text)
    176     else:
--> 177         self.statusBar.SetToolTipString( text )
    178
    179

NameError: global name 'self' is not defined
fbergmann commented 6 years ago

I think the function should be:

def wxSetToolTip(item, text):
    if _WX4:
        item.SetToolTip(text)
    else:
        item.SetToolTipString( text )

instead of the self-statusBar thing

mhucka commented 6 years ago

What is the version of wxpython you are using?

fbergmann commented 6 years ago

whatever anaconda had ... let me see ...

wx.__version__
Out[2]: '3.0.0.0'

and that makes perfect sense, as i was hitting the else part of the set-tooltip function, that needed the correction.

mhucka commented 6 years ago

Thanks for the report and the fix. I put it in a branch (https://github.com/sbmlteam/moccasin/tree/bugfix-1.1.3). If you're able to test it in your environment, I'd appreciate finding out how if it's enough.

fbergmann commented 6 years ago

And indeed with that the user interface starts just fine.

thank you

mhucka commented 6 years ago

Closing this as a bug that will be fixed in the version 1.2 release.