1

Topic: Problems running mmass 5.5.0 on Redhat 7.3

Hi.

I am trying to run mmass at our RHEL 7.3 but without success.

The linux computers are in an restricted environment, due to IT infrastructure.
So I solved wxPython dependencies, by installing anaconda python 2.7 64 bit.

> python --version
Python 2.7.13 :: Anaconda 4.4.0 (64-bit)

> conda install -c anaconda wxpython
> python -c "import wx;print wx.__version__"
3.0.0.0

Then I installed 5.5.0 like this:

# Get it (in tcsh)
set version=v5.5.0
set mfile=mmass_${version}_source.zip
wget http://www.mmass.org/download/files/$version/$mfile
unzip $mfile
rm $mfile

# Compile
cd ./mMass/mspy
python setup.py build
# Move calculations.so
find ./build -iname 'calculations.so' -type f | xargs -I '{}' mv '{}' .
cd ..

# Start it
python mmass.py

-- First problems
First a window opens, with the title "Mmass Warning".
The error shown is: "iCCP: known incorrect sRGB profile"

After this, there are 7 lines in window, each with the error:
"iCCP: known incorrect sRGB profile  11:44:10"

----------------
11:44:10: iCCP: known incorrect sRGB profile
11:44:10: iCCP: known incorrect sRGB profile
11:44:10: iCCP: known incorrect sRGB profile
11:44:10: iCCP: known incorrect sRGB profile
11:44:10: iCCP: known incorrect sRGB profile
11:44:10: iCCP: known incorrect sRGB profile
11:44:10: iCCP: known incorrect sRGB profile
---------------

After this, there is a GUI window,  with the title "Application Error".
----------------
Traceback (most recent call last):

  File "mmass.py", line 168, in <module>
    app = mMass(0)

  File "/home/ljz643/anaconda2/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line 8631, in __init__
    self._BootstrapApp()

  File "/home/ljz643/anaconda2/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line 8196, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)

  File "mmass.py", line 45, in OnInit
    self.frame = mainFrame(None, -1, 'mMass')

  File "/home/ljz643/software/mMass/gui/main_frame.py", line 135, in __init__
    self.makeGUI()

  File "/home/ljz643/software/mMass/gui/main_frame.py", line 733, in makeGUI
    self.spectrumPanel = panelSpectrum(self, self.documents)

  File "/home/ljz643/software/mMass/gui/panel_spectrum.py", line 57, in __init__
    self.makeGUI()

  File "/home/ljz643/software/mMass/gui/panel_spectrum.py", line 68, in makeGUI
    self.makeSpectrumCanvas()

  File "/home/ljz643/software/mMass/gui/panel_spectrum.py", line 89, in makeSpectrumCanvas
    self.spectrumCanvas.draw(self.container)

  File "/home/ljz643/software/mMass/mspy/plot_canvas.py", line 1080, in draw
    dc = wx.BufferedDC(wx.ClientDC(self), self.plotBuffer)

  File "/home/ljz643/anaconda2/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_gdi.py", line 5100, in __init__
    _gdi_.ClientDC_swiginit(self,_gdi_.new_ClientDC(*args, **kwargs))

PyAssertionError: C++ assertion "m_window" failed at ./src/gtk/dcclient.cpp(2041) in DoGetSize(): GetSize() doesn't work without window

-------------------------
mMass: 5.5.0
Python: ('2', '7', '13')
wxPython: 3.0.0.0 gtk2 (classic)
NumPy: 1.12.1
-------------------------
Architecture: ('64bit', 'ELF')
Machine: x86_64
Platform: Linux-3.10.0-514.21.1.el7.x86_64-x86_64-with-redhat-7.3-Maipo
Processor: x86_64
System: Linux
Mac: ('', ('', '', ''), '')
MSW: ('', '', '', '')
Linux: ('redhat', '7.3', 'Maipo')
-------------------------
Add your comments:

-----

Does anyone know what happens?

2

Re: Problems running mmass 5.5.0 on Redhat 7.3

There seems to be a bug report here:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758949

Apparently, mMass was build for wxPython 2.8.
Using wxPython 3.0 is causing this bug.

3

Re: Problems running mmass 5.5.0 on Redhat 7.3

There also seems to be a patch

https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=758949;filename=mmass-5.5.0-3.1-nmu.diff;msg=17

4

Re: Problems running mmass 5.5.0 on Redhat 7.3

I made an initial git check-in of the code of mMass 5.5.0.

Then I manually made the changes mentioned in the above patch.
Then I committed to git, and made a patch file:

> git format-patch -1 HEAD
> cat 0001-Made-pathches-to-get-mMass-5.5.0-to-work-on-wxPython.patch
From d4414403d7f403347d1886b9538a80a208c5fc70 Mon Sep 17 00:00:00 2001
From: ljz643 <ljz643@BL07540.science.domain>
Date: Thu, 7 Sep 2017 15:56:00 +0200
Subject: [PATCH] Made pathches, to get mMass 5.5.0 to work on wxPython 3.0

The patches was made from here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758949
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=758949;filename=mmass-5.5.0-3.1-nmu.diff;msg=17
---
gui/main_frame.py               | 2 +-
gui/panel_about.py              | 2 +-
gui/panel_calibration.py        | 2 +-
gui/panel_compounds_search.py   | 2 +-
gui/panel_document_export.py    | 8 ++++----
gui/panel_document_info.py      | 2 +-
gui/panel_envelope_fit.py       | 4 ++--
gui/panel_mascot.py             | 2 +-
gui/panel_mass_calculator.py    | 2 +-
gui/panel_mass_filter.py        | 2 +-
gui/panel_mass_to_formula.py    | 2 +-
gui/panel_match.py              | 2 +-
gui/panel_monomer_library.py    | 2 +-
gui/panel_periodic_table.py     | 2 +-
gui/panel_processing.py         | 2 +-
gui/panel_profound.py           | 2 +-
gui/panel_prospector.py         | 2 +-
gui/panel_sequence.py           | 2 +-
gui/panel_spectrum_generator.py | 2 +-
mmass.py                        | 3 +++
20 files changed, 26 insertions(+), 23 deletions(-)

diff --git a/gui/main_frame.py b/gui/main_frame.py
index c9ba37b..0d2ae14 100644
--- a/gui/main_frame.py
+++ b/gui/main_frame.py
@@ -1526,7 +1526,7 @@ class mainFrame(wx.Frame):
             
             # ask for name
             fileName = document.title+'.msd'
-            dlg = wx.FileDialog(self, "Save", config.main['lastDir'], fileName, "mMass Spectrum Document|*.msd", wx.SAVE|wx.OVERWRITE_PROMPT)
+            dlg = wx.FileDialog(self, "Save", config.main['lastDir'], fileName, "mMass Spectrum Document|*.msd", wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
             if dlg.ShowModal() == wx.ID_OK:
                 path = dlg.GetPath()
                 config.main['lastDir'] = os.path.split(path)[0]
diff --git a/gui/panel_about.py b/gui/panel_about.py
index 55952e1..95f966e 100644
--- a/gui/panel_about.py
+++ b/gui/panel_about.py
@@ -40,7 +40,7 @@ class panelAbout(frame):
     """About mMass."""
     
     def __init__(self, parent):
-        frame.__init__(self, parent, -1, frameTitle, style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.RESIZE_BOX | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX))
+        frame.__init__(self, parent, -1, frameTitle, style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX))
         self.parent = parent
         
         # make gui items
diff --git a/gui/panel_calibration.py b/gui/panel_calibration.py
index d4c5ca3..ce1c950 100644
--- a/gui/panel_calibration.py
+++ b/gui/panel_calibration.py
@@ -38,7 +38,7 @@ class panelCalibration(wx.MiniFrame):
     """Calibration tool."""
     
     def __init__(self, parent, tool='references'):
-        wx.MiniFrame.__init__(self, parent, -1, 'Calibration', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'Calibration', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ wx.MAXIMIZE_BOX)
         
         self.parent = parent
         self.processing = None
diff --git a/gui/panel_compounds_search.py b/gui/panel_compounds_search.py
index bf9984d..59b6ce1 100644
--- a/gui/panel_compounds_search.py
+++ b/gui/panel_compounds_search.py
@@ -39,7 +39,7 @@ class panelCompoundsSearch(wx.MiniFrame):
     """Compounds search tool."""
     
     def __init__(self, parent, tool='compounds'):
-        wx.MiniFrame.__init__(self, parent, -1, 'Compounds Search', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'Compounds Search', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ wx.MAXIMIZE_BOX)
         
         self.parent = parent
         self.matchPanel = None
diff --git a/gui/panel_document_export.py b/gui/panel_document_export.py
index 66ae8aa..69c7ada 100644
--- a/gui/panel_document_export.py
+++ b/gui/panel_document_export.py
@@ -35,7 +35,7 @@ class panelDocumentExport(wx.MiniFrame):
     """Document export tools."""
     
     def __init__(self, parent, tool='image'):
-        wx.MiniFrame.__init__(self, parent, -1, 'Export', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'Export', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.MAXIMIZE_BOX))
         
         self.parent = parent
         self.processing = None
@@ -508,7 +508,7 @@ class panelDocumentExport(wx.MiniFrame):
             fileType = "JPEG image file|*.jpg"
         
         # raise export dialog
-        dlg = wx.FileDialog(self, "Export Spectrum Image", config.main['lastDir'], fileName, fileType, wx.SAVE|wx.OVERWRITE_PROMPT)
+        dlg = wx.FileDialog(self, "Export Spectrum Image", config.main['lastDir'], fileName, fileType, wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
         if dlg.ShowModal() == wx.ID_OK:
             path = dlg.GetPath()
             config.main['lastDir'] = os.path.split(path)[0]
@@ -544,7 +544,7 @@ class panelDocumentExport(wx.MiniFrame):
             fileType = "MGF file|*.mgf"
         
         # raise export dialog
-        dlg = wx.FileDialog(self, "Export Peak List", config.main['lastDir'], fileName, fileType, wx.SAVE|wx.OVERWRITE_PROMPT)
+        dlg = wx.FileDialog(self, "Export Peak List", config.main['lastDir'], fileName, fileType, wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
         if dlg.ShowModal() == wx.ID_OK:
             path = dlg.GetPath()
             config.main['lastDir'] = os.path.split(path)[0]
@@ -579,7 +579,7 @@ class panelDocumentExport(wx.MiniFrame):
         fileType = "ASCII file|*.txt"
         
         # raise export dialog
-        dlg = wx.FileDialog(self, "Export Spectrum Data", config.main['lastDir'], fileName, fileType, wx.SAVE|wx.OVERWRITE_PROMPT)
+        dlg = wx.FileDialog(self, "Export Spectrum Data", config.main['lastDir'], fileName, fileType, wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
         if dlg.ShowModal() == wx.ID_OK:
             path = dlg.GetPath()
             config.main['lastDir'] = os.path.split(path)[0]
diff --git a/gui/panel_document_info.py b/gui/panel_document_info.py
index 73113de..9cc2c89 100644
--- a/gui/panel_document_info.py
+++ b/gui/panel_document_info.py
@@ -34,7 +34,7 @@ class panelDocumentInfo(wx.MiniFrame):
     """Document info tools."""
     
     def __init__(self, parent, tool='summary'):
-        wx.MiniFrame.__init__(self, parent, -1, 'Document Information', size=(400, 200), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'Document Information', size=(400, 200), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.MAXIMIZE_BOX))
         
         self.parent = parent
         
diff --git a/gui/panel_envelope_fit.py b/gui/panel_envelope_fit.py
index 1832237..2b87c11 100644
--- a/gui/panel_envelope_fit.py
+++ b/gui/panel_envelope_fit.py
@@ -35,7 +35,7 @@ class panelEnvelopeFit(wx.MiniFrame):
     """Envelope fit tool."""
     
     def __init__(self, parent):
-        wx.MiniFrame.__init__(self, parent, -1, 'Envelope Fit', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'Envelope Fit', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ wx.MAXIMIZE_BOX)
         
         self.parent = parent
         
@@ -722,4 +722,4 @@ class panelEnvelopeFit(wx.MiniFrame):
     # ----
     
     
-   
\ No newline at end of file
+   
diff --git a/gui/panel_mascot.py b/gui/panel_mascot.py
index d93c448..6ca03a3 100644
--- a/gui/panel_mascot.py
+++ b/gui/panel_mascot.py
@@ -42,7 +42,7 @@ class panelMascot(wx.MiniFrame):
     """Mascot search tool."""
     
     def __init__(self, parent, tool=config.mascot['common']['searchType']):
-        wx.MiniFrame.__init__(self, parent, -1, 'Mascot Tools', size=(300, -1), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'Mascot Tools', size=(300, -1), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.MAXIMIZE_BOX))
         
         self.parent = parent
         self.processing = None
diff --git a/gui/panel_mass_calculator.py b/gui/panel_mass_calculator.py
index 57179f7..2d30e75 100644
--- a/gui/panel_mass_calculator.py
+++ b/gui/panel_mass_calculator.py
@@ -37,7 +37,7 @@ class panelMassCalculator(wx.MiniFrame):
     """Mass calculator tools."""
     
     def __init__(self, parent, tool='pattern'):
-        wx.MiniFrame.__init__(self, parent, -1, 'Mass Calculator', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'Mass Calculator', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ wx.MAXIMIZE_BOX)
         
         self.parent = parent
         
diff --git a/gui/panel_mass_filter.py b/gui/panel_mass_filter.py
index d789d31..1954fbf 100644
--- a/gui/panel_mass_filter.py
+++ b/gui/panel_mass_filter.py
@@ -36,7 +36,7 @@ class panelMassFilter(wx.MiniFrame):
     """Mass filter tool."""
     
     def __init__(self, parent):
-        wx.MiniFrame.__init__(self, parent, -1, 'Mass Filter', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'Mass Filter', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ wx.MAXIMIZE_BOX)
         
         self.parent = parent
         self.matchPanel = None
diff --git a/gui/panel_mass_to_formula.py b/gui/panel_mass_to_formula.py
index a01f63b..0fc1e93 100644
--- a/gui/panel_mass_to_formula.py
+++ b/gui/panel_mass_to_formula.py
@@ -38,7 +38,7 @@ class panelMassToFormula(wx.MiniFrame):
     """Mass to formula tool."""
     
     def __init__(self, parent):
-        wx.MiniFrame.__init__(self, parent, -1, 'Mass To Formula', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'Mass To Formula', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ wx.MAXIMIZE_BOX)
         
         self.parent = parent
         
diff --git a/gui/panel_match.py b/gui/panel_match.py
index 5feeb1e..029c4d2 100644
--- a/gui/panel_match.py
+++ b/gui/panel_match.py
@@ -36,7 +36,7 @@ class panelMatch(wx.MiniFrame):
     """Data match tool."""
     
     def __init__(self, parentTool, mainFrame, module):
-        wx.MiniFrame.__init__(self, parentTool, -1, 'Match Data', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parentTool, -1, 'Match Data', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ wx.MAXIMIZE_BOX)
         
         self.parentTool = parentTool
         self.mainFrame = mainFrame
diff --git a/gui/panel_monomer_library.py b/gui/panel_monomer_library.py
index 184426c..454f305 100644
--- a/gui/panel_monomer_library.py
+++ b/gui/panel_monomer_library.py
@@ -34,7 +34,7 @@ class panelMonomerLibrary(wx.MiniFrame):
     """Monomer library."""
     
     def __init__(self, parent, filterIn=[], filterOut=[], DnD=True):
-        wx.MiniFrame.__init__(self, parent, -1, 'Monomer Library', size=(250, 300), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'Monomer Library', size=(250, 300), style=wx.DEFAULT_FRAME_STYLE & ~ wx.MAXIMIZE_BOX)
         
         self.parent = parent
         self.filterIn = filterIn
diff --git a/gui/panel_periodic_table.py b/gui/panel_periodic_table.py
index 7223cb5..046972a 100644
--- a/gui/panel_periodic_table.py
+++ b/gui/panel_periodic_table.py
@@ -34,7 +34,7 @@ class panelPeriodicTable(wx.MiniFrame):
     """Periodic table of elements."""
     
     def __init__(self, parent):
-        wx.MiniFrame.__init__(self, parent, -1, 'Periodic Table of the Elements', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BOX | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'Periodic Table of the Elements', size=(400, 300), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.MAXIMIZE_BOX))
         
         self.parent = parent
         
diff --git a/gui/panel_processing.py b/gui/panel_processing.py
index 5676623..22843b0 100644
--- a/gui/panel_processing.py
+++ b/gui/panel_processing.py
@@ -38,7 +38,7 @@ class panelProcessing(wx.MiniFrame):
     """Data processing tools."""
     
     def __init__(self, parent, tool='peakpicking'):
-        wx.MiniFrame.__init__(self, parent, -1, 'Processing', size=(300, -1), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'Processing', size=(300, -1), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.MAXIMIZE_BOX))
         
         self.parent = parent
         
diff --git a/gui/panel_profound.py b/gui/panel_profound.py
index 80a3ce7..7516cf3 100644
--- a/gui/panel_profound.py
+++ b/gui/panel_profound.py
@@ -37,7 +37,7 @@ class panelProfound(wx.MiniFrame):
     """Profound search tool."""
     
     def __init__(self, parent, tool='pmf'):
-        wx.MiniFrame.__init__(self, parent, -1, 'ProFound Search', size=(300, -1), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'ProFound Search', size=(300, -1), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.MAXIMIZE_BOX))
         
         self.parent = parent
         
diff --git a/gui/panel_prospector.py b/gui/panel_prospector.py
index 2e641cf..247b821 100644
--- a/gui/panel_prospector.py
+++ b/gui/panel_prospector.py
@@ -37,7 +37,7 @@ class panelProspector(wx.MiniFrame):
     """ProteinProspector search tools."""
     
     def __init__(self, parent, tool=config.prospector['common']['searchType']):
-        wx.MiniFrame.__init__(self, parent, -1, 'Protein Prospector', size=(300, -1), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'Protein Prospector', size=(300, -1), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.MAXIMIZE_BOX))
         
         self.parent = parent
         
diff --git a/gui/panel_sequence.py b/gui/panel_sequence.py
index 35880ca..1898802 100644
--- a/gui/panel_sequence.py
+++ b/gui/panel_sequence.py
@@ -39,7 +39,7 @@ class panelSequence(wx.MiniFrame):
     """Sequence tools."""
     
     def __init__(self, parent, tool='editor'):
-        wx.MiniFrame.__init__(self, parent, -1, 'Sequence', size=(500, 300), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'Sequence', size=(500, 300), style=wx.DEFAULT_FRAME_STYLE & ~ wx.MAXIMIZE_BOX)
         
         self.parent = parent
         self.matchPanel = None
diff --git a/gui/panel_spectrum_generator.py b/gui/panel_spectrum_generator.py
index d595240..4b19a02 100644
--- a/gui/panel_spectrum_generator.py
+++ b/gui/panel_spectrum_generator.py
@@ -35,7 +35,7 @@ class panelSpectrumGenerator(wx.MiniFrame):
     """Spectrum generator tool."""
     
     def __init__(self, parent):
-        wx.MiniFrame.__init__(self, parent, -1, 'Spectrum Generator', size=(700, 400), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BOX | wx.MAXIMIZE_BOX))
+        wx.MiniFrame.__init__(self, parent, -1, 'Spectrum Generator', size=(700, 400), style=wx.DEFAULT_FRAME_STYLE & ~ wx.MAXIMIZE_BOX)
         
         self.parent = parent
         
diff --git a/mmass.py b/mmass.py
index c6812e4..d287e4f 100644
--- a/mmass.py
+++ b/mmass.py
@@ -37,6 +37,9 @@ class mMass(wx.App):
     
     def OnInit(self):
         """Init application."""
+
+        # Suppress WXDEBUG assertions, as happens by default with wx2.8.
+        self.SetAssertMode(wx.PYAPP_ASSERT_SUPPRESS)
         
         # set some special wx params
         mwx.appInit()
--
1.8.3.1

5

Re: Problems running mmass 5.5.0 on Redhat 7.3

The patch is also here:

https://gist.githubusercontent.com/tlinnet/44887c3056f33314f432cd35fe222ee0/raw/a5d20bb2e3070060bfe210a1ebdebe5f2c646cfc/0001-Made-pathches-to-get-mMass-5.5.0-to-work-on-wxPython.patch

6

Re: Problems running mmass 5.5.0 on Redhat 7.3

I got this to work!

This is the entire install procedure:

--------------------------
Install on Redhat 7.3

We will install mMass Version 5.5.0 Red Hat Enterprise Linux Workstation release 7.3
We will assume, that you do not have any sudo privileges to add rpm-packages.

Therefore, we need to be able to install a local version of python.
We will use anaconda for this.

Get anaconda python
    Head to: https://www.anaconda.com/download/
    Download: https://conda.io/miniconda.html
    Chose the minimal installer: Python 2.7, 64-bit (bash installer)

Start installation of anaconda:
---------
# Go to download
cd $HOME/Downloads
# Make installer executable
chmod +x Miniconda2-latest-Linux-x86_64.sh
./Miniconda2-latest-Linux-x86_64.sh
----------

Add anaconda to your PATH
---------
cd $HOME
touch .cshrc
echo '# Anaconda' >>.cshrc
echo 'set path = (${HOME}/miniconda2/bin $path)' >> .cshrc
----------
Open a new terminal, to let the change take effect.

Install mmass dependencies
Install wxpython
-----------------
# Version 3: https://anaconda.org/anaconda/wxpython
conda install -c anaconda wxpython

# Check version
python -c "import wx;print wx.__version__"
-----------------

Install numpy
----------------
# https://anaconda.org/anaconda/numpy
conda install -c anaconda numpy

# Check version
python -c "import numpy;print numpy.__version__"
----------------

Install mmass
-----------------
cd $HOME/Downloads

# Download and unpack
set version=v5.5.0
set mfile=mmass_${version}_source.zip
wget http://www.mmass.org/download/files/$version/$mfile
unzip $mfile
rm $mfile

# Build, and move file
cd ./mMass/mspy
python setup.py build
ls -la calculations.so
find ./build -iname 'calculations.so' -type f | xargs -I '{}' mv '{}' .
ls -la calculations.so
cd ..

# Try running it
python mmass.py

# Get patch,
wget https://gist.githubusercontent.com/tlinnet/44887c3056f33314f432cd35fe222ee0/raw/a5d20bb2e3070060bfe210a1ebdebe5f2c646cfc/0001-Made-pathches-to-get-mMass-5.5.0-to-work-on-wxPython.patch

# Then patch it
git apply 0001-Made-pathches-to-get-mMass-5.5.0-to-work-on-wxPython.patch

# Try running it
python mmass.py
-----------------

It works :)