SOLVED: Stuck during loading MSI-Tomograph2 application
Added by Aguang Dai over 6 years ago
Hi there,
Recently, we started to set up Tomography in Leginon.
We imported it from the webpage first, and MSI-Tomography2 could be seen in Applications on Leginon.
When we run the application, the status bar says "Starting application MSI-Tomograph2", but frozen there even waiting for long time.
FYI, our MSI-T2 runs smoothly for Single-Particle collection, so it may not be an installation issue.
I didn't see any special instruction for Tomography setup in manual, so I wonder whether there is any special step/configuration to set up Tomography.
Thanks.
Best,
Aguang
Replies (15)
RE: Stuck during loading MSI-Tomograph2 application - Added by Anchi Cheng over 6 years ago
Is there not-handled error in the text terminal where leginon was launched ? I can not think of anything specific to the application that can cause this. Is it possible that Leginon clients were not assigned correctly ? The gui does not order the client list consistently between applications. Therefore, there is a chance that a camera client is assigned to the scope. When the application is loaded, it will attempt connection to retrieve instrument information. It may get stuck there.
If the clients are assigned correctly, please export the problem application as an xml file and upload it here. I will take a look. The instruction for doing so can be found in Application Administration.
RE: Stuck during loading MSI-Tomograph2 application - Added by Aguang Dai over 6 years ago
Hi Anchi,
Thanks for quick reply.
I think it's not client assignment problem.
I tested this morning, run MSI-T2 first then killed the application to run MSI-Tomography2.
For MSI-T2, everything is fine, but always the same frozen issue with MSI-Tomograph2.
I tried this twice, the same.
There is some not-handled error in the terminal when I was running MSI-Tomograph2
"
Leginon version: 0
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/leginon/gui/wx/Launcher.py", line 357, in onCreateNodePanel
evt.panel = panelclass(parent=self, nodeclass=evt.nodeclass)
File "/usr/local/lib/python2.7/dist-packages/leginon/gui/wx/tomography/Tomography.py", line 516, in init
leginon.gui.wx.Acquisition.Panel.__init__(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/leginon/gui/wx/Acquisition.py", line 471, in init
self.addImagePanel()
File "/usr/local/lib/python2.7/dist-packages/leginon/gui/wx/tomography/Tomography.py", line 532, in addImagePanel
self.viewer = TomoViewer.Viewer(self, -1)
File "/usr/local/lib/python2.7/dist-packages/leginon/gui/wx/tomography/TomographyViewer.py", line 20, in init
self.imageviewer1 = viewer.Viewer(self, -1)
File "/usr/local/lib/python2.7/dist-packages/imageviewer/viewer.py", line 29, in init
self.tooltipplugin = plugins.ToolTipPlugin(self.imagewindow)
File "/usr/local/lib/python2.7/dist-packages/imageviewer/plugins.py", line 240, in init
self.setText(None)
File "/usr/local/lib/python2.7/dist-packages/imageviewer/plugins.py", line 275, in setText
self.imagewindow.onUpdatePluginRegion(self)
File "/usr/local/lib/python2.7/dist-packages/imageviewer/window.py", line 313, in onUpdatePluginRegion
rect = self.updateScrollbars()
File "/usr/local/lib/python2.7/dist-packages/imageviewer/window.py", line 213, in updateScrollbars
self.SetScrollbar(wx.HORIZONTAL, 0, 0, 0)
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 11226, in SetScrollbar
return core.Window_SetScrollbar(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "sb" failed at ../src/gtk/window.cpp(4754) in SetScrollbar(): this window is not scrollable
"
------This error only happened when I run MSI-Tomography2; if I run MSI-T2, no screen message.
I tried application MSI-Tomography too, the same frozen problem.
I attached the XML file, MSI-Tomograph2.xml
Thanks a lot.
Best regards,
Aguang
MSI-Tomography2.xml (49.1 KB) MSI-Tomography2.xml |
RE: Stuck during loading MSI-Tomograph2 application - Added by Anchi Cheng over 6 years ago
It is a gui issue. Your wxPython is beyond what we officially support. The image viewer in Tomography node is coded differently from the rest of Leginon. Let me see if I can reproduce it somewhere and patch it up. I have wxPython version 3.0.0.0 on my Mac and it works o.k so there is hope to fix this.
Could you give me the wxPython version ?
python /usr/local/lib/python2.7/dist-packages/leginon/syscheck.py
The terminal output contains the version of all python supporting package versions.
RE: Stuck during loading MSI-Tomograph2 application - Added by Aguang Dai over 6 years ago
The version info is as below:
~$ python /usr/local/lib/python2.7/dist-packages/leginon/syscheck.py
--------------------------------------------------------------
Looking for previously installed Leginon...
Leginon found here: /usr/local/lib/python2.7/dist-packages/leginon
*** It is best to uninstall your previous Leginon before installing
the new one. The best way to uninstall is to move it to a backup
location, just in case you need to revert to the old version.
--------------------------------------------------------------
Python:
Python executable (if wrong, check PATH in your environment):
/usr/bin/python
Python module search path (if wrong, check PYTHONPATH):
/usr/local/lib/python2.7/dist-packages/leginon
/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/PILcompat
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/python2.7/dist-packages/wx-3.0-gtk2
Python version: 2.7.12
OK (at least 2.3.4 required)
Python says home directory is: /home/aguang
--------------------------------------------------------------
Python Imaging Library (PIL):
importing Image module...
PIL version: 1.1.7
OK (at least 1.1.4 required)
--------------------------------------------------------------
MySQL Python client (MySQLdb):
importing MySQLdb module...
Python MySQL version: 1.3.7
OK (at least 1.2 required)
--------------------------------------------------------------
numpy:
importing numpy module...
numpy version: 1.11.0
OK (at least 1.0 required)
--------------------------------------------------------------
scipy:
importing scipy.optimize module...
testing for leastsq function...
OK
--------------------------------------------------------------
wxPython:
importing wx module...
wxPython version: 3.0.2.0
OK (at least 2.5.2.8 required)
Testing a wxPython application. Close the window that pops up...
RE: Stuck during loading MSI-Tomograph2 application - Added by Anchi Cheng over 6 years ago
Give this a try:
With sudo privilege change this file on your linux box:
/usr/local/lib/python2.7/dist-packages/imageviewer/window.py
Find the line
class Window(wx.Window):
change that to
class Window(wx.ScrolledWindow):
remove /usr/local/lib/python2.7/dist-packages/imageviewer/window.pyc if you have one so that it will sure to recompile.
If that works, I will make a general fix.
RE: Stuck during loading MSI-Tomograph2 application - Added by Aguang Dai over 6 years ago
Hi Anchi,
The line was changed to "class Window(wx.ScrolledWindow):", then I logged out everything and re-log in.
When I re-run the application, still the same error.
RE: Stuck during loading MSI-Tomograph2 application - Added by Anchi Cheng over 6 years ago
It is not about logging out. Please remove window.pyc file.
Looking at other implementations, it should have worked since the rest of the gui has converted to use ScrolledWindow a long time ago.
If that does not work, still, I will send you a file that comment out the scrollbar setting part.
RE: Stuck during loading MSI-Tomograph2 application - Added by Patrick Goetz over 6 years ago
Hi Anchi,
I modified /usr/local/lib/python2.7/dist-packages/imageviewer/window.py
as requested and deleted the window.pyc file. Here are the first few lines of window.py:
import wx class Window(wx.ScrolledWindow): def __init__(self, parent, id): wx.Window.__init__(self, parent, id)
I'm not with Aguang, but I notice that after the last attempt no new window.pyc was compiled, indicating perhaps that it's not getting to this script?
RE: Stuck during loading MSI-Tomograph2 application - Added by Anchi Cheng over 6 years ago
You can confirm which one he access by starting python command line as him and then test import like this
python> import imageviewer python> imageviewer
The last command will give you where the import was loaded.
RE: Stuck during loading MSI-Tomograph2 application - Added by Aguang Dai over 6 years ago
I tried,
The info is as below:
aguang@kraken:~$ python
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import imageviewer
imageviewer
<module 'imageviewer' from '/usr/local/lib/python2.7/dist-packages/imageviewer/__init__.pyc'>
RE: Stuck during loading MSI-Tomograph2 application - Added by Anchi Cheng over 6 years ago
Here is workaround window.py that you can replace with.
It bypass the SetScrollbar function. You will lose the scrollbar but it should get you past where you are. There is a possibility that other problem will show up but let's see if this helps. On my wxpython 3.0.0 it just took the scroll bar off.
RE: Stuck during loading MSI-Tomograph2 application - Added by Anchi Cheng over 6 years ago
The other thing to try is that I just noticed another line that need change in the original code:
The original code still initialized with wx.Window in its init function.
Therefore, it should be changed, too.
Here is what it should look like after both changes.
import wx class Window(wx.ScrolledWindow): def __init__(self, parent, id): wx.ScrolledWindow.__init__(self, parent, id)
RE: Stuck during loading MSI-Tomograph2 application - Added by Patrick Goetz over 6 years ago
Yeah, I was wondering about that. I wasn't sure if it was initializing the class Window you defined or the system one. Let me try changing this first before we give up on the scroll bar, which is almost certainly not optimal. That's why I posted that code snippet.
RE: Stuck during loading MSI-Tomograph2 application - Added by Aguang Dai over 6 years ago
Hi Anchi and Patrick,
I tried again with the new code, it works now.
PS, I was about to mention that line too, but I saw Patrick posted it, lol.
Thanks a lot for you two's help.
Best,
Aguang
RE: Stuck during loading MSI-Tomograph2 application - Added by Anchi Cheng over 6 years ago
Created Issue #5625 and applied this change to trunk. beta and 3.3 version