Forums » Software Installation »
camera related pyscope call such as windll not found when start leginon on the linux processing server
Added by Anchi Cheng over 13 years ago
Question from Xing Meng
> However, when doing start-leginon.py in the server linux > it stopped showing error as the following > > ======================================================================================= > raceback (most recent call last): > File "/usr/bin/start-leginon.py", line 9, in <module> > from leginon import start > File "/usr/lib64/python2.5/site-packages/leginon/start.py", line 13, > in <module> > import leginon.gui.wx.Manager > File "/usr/lib64/python2.5/site-packages/leginon/gui/wx/Manager.py", > line 20, in <module> > from leginon import manager > File "/usr/lib64/python2.5/site-packages/leginon/manager.py", line 19, > in <module> > import launcher > File "/usr/lib64/python2.5/site-packages/leginon/launcher.py", line > 14, in <module> > import noderegistry > File "/usr/lib64/python2.5/site-packages/leginon/noderegistry.py", > line 33, in <module> > import leginon.allnodes > File "/usr/lib64/python2.5/site-packages/leginon/allnodes.py", line > 157, in <module> > from driftmanager import DriftManager > File "/usr/lib64/python2.5/site-packages/leginon/driftmanager.py", > line 20, in <module> > import EM > File "/usr/lib64/python2.5/site-packages/leginon/EM.py", line 15, in > <module> > from pyscope import tem, ccdcamera, registry > File "/usr/lib64/python2.5/site-packages/pyscope/registry.py", line 9, > in <module> > import config > File "/usr/lib64/python2.5/site-packages/pyscope/config.py", line 39, > in <module> > mod = imp.load_module(fullmodname, *args) > File "/usr/lib64/python2.5/site-packages/pyscope/tietz.py", line 14, > in <module> > import enumproc > File "/usr/lib64/python2.5/site-packages/pyscope/enumproc.py", line > 14, in <module> > psapi = windll.psapi > NameError: name 'windll' is not defined > ========================================================= > We tried at python 2.4 (default for centos) , 2.5 and 2.6 > showing the same problem. > > Thanks > Xing
Replies (9)
RE: camera related pyscope call such as windll not found when start leginon on the linux processing server - Added by Anchi Cheng over 13 years ago
The problem here is that you are starting leginon on the linux machine which is not controlling the camera. The camera is controlled by a Windows PC. In most cases, this PC is also the microscope computer. If your camera is on a different computer than the microscope PC, we will have to teach you how to modify the applications for that.
When you set up instruments.cfg on the linux machine, you should not add any real camera to it. Leave only the simulators (as in the case of the default). On the other hand, on the Windows PC where the camera is controlled from, add the camera to the pyscope/instruments.cfg (and the microscope, if it is the same computer) and remove all simulators.
See Installation_on_the_microscope_computer regarding Configure instruments.cfg
Also, when you start leginon on the linux server, make sure that you first starts Leginon client on the microscope PC so that the main Leginon process on the linux box can find it and put the Instrument node over and allow data to pass between the two. These are covered in step 4 and 5 of Start_Leginon
RE: camera related pyscope call such as windll not found when start leginon on the linux processing server - Added by Xing Meng over 13 years ago
Thanks.
It was connected set as you asked
Our camera is indeed on a different computer than the microscope PC.
Our leginon was install on ccd pc where we can work 'start-leginon.py' and 'launcher.py'
At the Linux manualAcquiring node, only 'Manual menu' appears and is functional while client (ccd pC) shows 'power spectrum' , 'Instrument', 'Manual' and 'Correction'.
Another problem
CCD setup
if bin=1 4096 x4096 an acquisition will be failed with
=================================================================
Exception in thread Thread-69:
Traceback (most recent call last):
File "C:\python25\Lib\threading.py", line 460, in bootstrap
self.run()
File "C:\python25\Lib\threading.py", line 440, in run
self.__target(*self.__args, **self.__kwargs)
File "C:\Python25\lib\site-packages\leginon\manualacquisition.py", line 26
n acquireImage
self.acquire()
File "C:\Python25\lib\site-packages\leginon\manualacquisition.py", line 12
n acquire
imagedata = self.acquireCameraImageData(scopeclass=scopeclass)
File "c:\Python25\Lib\site-packages\leginon\cameraclient.py", line 55, in
ireCameraImageData
imagedata['image'] = self.instrument.ccdcamera.Image
File "C:\Python25\Lib\site-packages\leginon\remotecall.py", line 220, in _
attr
return self._objectservice._call(self._nodename, self._name, name, 'r')
File "C:\Python25\Lib\site-packages\leginon\remotecall.py", line 354, in _
======================================================================================
using a custom setting, 4095 x 4095
it works
why???
return self.clients[node].send(request)
File "C:\Python25\Lib\site-packages\leginon\datatransport.py", line 62, in
d
raise result
TypeError: argument 3 must be integer<K>, not float
Correction problem
after acquiring either dark/bright images (either on pc or linux), correction is functionally stuck with
============================================================================================================
Exception in thread Thread-43:
Traceback (most recent call last):
File "C:\python25\Lib\threading.py", line 460, in _bootstrap
self.run()
File "C:\python25\Lib\threading.py", line 440, in run
self._target(*self.__args, **self.__kwargs)
File "C:\Python25\lib\site-packages\leginon\corrector.py", line 89, in acquire
Dark
imagedata = self.acquireReference(type='dark', channel=channel)
File "C:\Python25\lib\site-packages\leginon\corrector.py", line 216, in acquir
eReference
refimagedata = self.storeCorrectorImageData(ref, typekey, scopedata, camerad
ata, channel)
File "c:\Python25\Lib\site-packages\leginon\correctorclient.py", line 337, in
storeCorrectorImageData
if dim['x'] != shape1 or dim['y'] != shape0:
IndexError: tuple index out of range
==========================================================================================
Thanks
Xing
RE: camera related pyscope call such as windll not found when start leginon on the linux processing server - Added by Anchi Cheng over 13 years ago
Let's solve one problem at a time.
First, because your microscope and camera are on different pc, you need modified Leginon applications. I attach here the basic ones. See Applications on how to import them to your database.
When you run these applications, you should see three instead of three selections for where the nodes go. Match it with your computers: scope to tecnaixxx, camera to tietz pc, and main to the computer where you start leginon from.
Second, please give us more details about the Leginon you are running, camera model etc.
Manual2__2.1__0.xml (5.11 KB) Manual2__2.1__0.xml | |||
Calibrations2__2.1__0.xml (13.8 KB) Calibrations2__2.1__0.xml | |||
MSI-T2__2.1__0.xml (43.6 KB) MSI-T2__2.1__0.xml |
RE: camera related pyscope call such as windll not found when start leginon on the linux processing server - Added by Anchi Cheng over 13 years ago
Third, your description is confusing to us. In one sentence you say that "Our leginon was install on ccd pc where we can work 'start-leginon.py' and 'launcher.py'". Is it also installed on the linux and the microscope? Are you trying to tell us that you ran from the ccd camera pc when the error appeared? or is it just a statement that means there IS an working leginon on the camera pc? Being able to start 'start-leginon.py' or 'launcher.py' only means that you have all the supporting packages and have a configuration set up. Did you Test Leginon on the Computer Controlling the Microscope? Given that you have the separate microscope/camera pc setup, I suspect that it would have failed there. Please do that but use the new applications that I attached above.
In the next paragraph you described that "At the Linux manualAcquiring node, only 'Manual menu' appears and is functional while client (ccd pC) shows 'power spectrum' , 'Instrument', 'Manual' and 'Correction'." Does this mean that all nodes appear on the camera pc even though you started the application on the Linux box? This is not right. After you choose the application, By assigning the right host like this:
you should get 'Scope' on scope pc in its leginon client, 'Camera' on tietz pc in its leginon client, and the rest of the nodes on your linux computer where you ran "start-leginon.py".
Your message also did not say if your original problem has gone away.
application_launch.png (7.85 KB) application_launch.png |
RE: camera related pyscope call such as windll not found when start leginon on the linux processing server - Added by Xing Meng over 13 years ago
Thanks and sorry for not telling more details.
The following diagram shows our configuration,
TF20(computer)
^
^ (connected by Microsoft DCOM)
^
Tietz 4k CCD computer (WIN XP)
(CAMC4 and tecnai base operation modules installed no TIA)
^
^ ( one time only one application can be active)
^
__________________________
^ ^ ^
application application application
EM-MENU4 EMSerial Leginon (packages for TEM control).
^
^
^
one Linux (database server, web server and leginon packages)
Through camc4 and FEI modules, applications on ccd computer can communicate with TEM (as a local computer).
We have installed required all packages in both ccd computer and server Linux accordingly.
From web server, Manual Application, imported.
On web server, CCD computer IP ( alias name to 'tietz') is set for instroment IP for both the TEM and CCD.
Test Leginon on the Computer Controlling the Microscope,
Run 'start-leginon.py'
After initialization, we can select Instrument node,
Left-click on the tool "Get Magnification". showing the right parameter.
Also we can act screen up/down through instrument node.
At first time when trying aquiring raw images there was error on dos-text window
"unable initailizing low-dose module."
After installing the teicnai lowdose module to CCD computer, the error text disappeared in same same situations.
My quetion now is that
Is this setup OK without concerning TEM computer?
Thanks
Xing
By the way, windll problem was gone with changing instruments.cfg.on LINUX instructed from you.
,
RE: camera related pyscope call such as windll not found when start leginon on the linux processing server - Added by Anchi Cheng over 13 years ago
Thanks for the information. Although I've not known Leginon set up in your configuration, but since you were able to get magnification and move the screen position, that does not seem to be the main problem. Am I reading your posting correctly that you were able to collect raw images without saving by starting leginon on the tietz pc? By that I mean no error and a real image appeared in Leginon panel.
If that is true, please try my previous suggestion on starting Leginon on the linux box but make sure that you do set main to the linux host. The error message you sent showed that you let "Correction" and "Manual" node to be sent to the Tietz PC which would not be right in this setup. The error message on remotecall is too general that we could not tell how it could have arrive to that point except that we could tell that "Manual" node was on Tietz PC which it should not be in this case.
Also, try to simplify your test for now:
- double check your tem and camera configurations in Manual and Correction nodes. If the selection box has more than one item (the other one should be "None"), toggle the selection to the other and toggle back to your tem and your camera. It might still be pointing to simulated instruments in the database from the bad configuration previously. The toggling make sure that the new selection is recorded in the database.
- collect a raw 4kx4k image using Manual application Manual node from the linux box and make sure that it can be saved and displayed.
- If that succeeds, acquire a raw image with Correction node. If you can acquire raw image in both nodes, the dark/bright should not fail since they use the same function.
- The message you reported regarding tuple out of range tells me that you had selected some bad pixels to be removed. Clear them out before you acquire the corrected image. You might have accidentally included bad positions for these (This has happened before to others). You are add them again after this test is successful.
We still need to know which version of Leginon you are using. There are some bug fixes to the branches since their releases. Make sure you have them.
If you still have problem after this round. We may need to set up a desktop sharing session or a phone call with you.
Anchi
RE: camera related pyscope call such as windll not found when start leginon on the linux processing server - Added by Xing Meng over 13 years ago
Anchi,
Thanks
Now, the basic install looks OK
On Linux server,
from 'launcher' add hostname 'tietz' to port '55555'
when running application, the initialization shows
scope 'tietz'
main 'esp-2-45' (that is linux hostname).
There are 4 nodes, 'instrument', 'Power Spectrum', "Manual' and "Correction".
"Power Spectrum', "Manual' and "Correction". are shown in Linux interface
while "instrument" in client (ccd pc).
Collect raw ccd images: OK in
collect dark images : OK
collect bright image : OK
collect corrected image: OK
The left problems,
LoweDose images failed
after selecting lowdose
acquisition was not active with the errors,
=======================================
Exception in thread Thread-13:
Traceback (most recent call last):
File "/usr/lib64/python2.4/threading.py", line 442, in bootstrap
self.run()
File "/usr/lib64/python2.4/threading.py", line 422, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.4/site-packages/leginon/manualacquisition.py", line 242, in acquireImage
self.preExposure()
File "/usr/lib/python2.4/site-packages/leginon/manualacquisition.py", line 155, in preExposure
self.lowdosemode = self.instrument.tem.LowDoseMode
File "/usr/lib/python2.4/site-packages/leginon/remotecall.py", line 220, in __getattr
return self._objectservice._call(self._nodename, self._name, name, 'r')
File "/usr/lib/python2.4/site-packages/leginon/remotecall.py", line 354, in _call
return self.clients[node].send(request)
File "/usr/lib/python2.4/site-packages/leginon/datatransport.py", line 62, in send
raise result
AttributeError: eExposure
===========================================================
Thanks
RE: camera related pyscope call such as windll not found when start leginon on the linux processing server - Added by Anchi Cheng over 13 years ago
You may find some of the discussion in pyScope Forum relevent to your problem now. Jim will be able to tell you more.
Here is what I know you can check. In this process, we want to find out if the attribute eExposure is generated from your LowDose kit:
- On your tietz pc where you ran makepy, go to C:\\Python25\Lib\site-packages\win32com\gen_py
- find the .py file that is generated from the low dose kie, most likely the one with the name starting with 9BE
- You will know it is the right file once you open it with a text editor, one of the line in the first ten should say "Low Dose Server Library"
- Search in this file for "eExposure". If not there, you have gotten a version of the Low Dose kit with different attribute names from what we have dealt with thus far. You may want to send that file to us if this is true.
If you find eExposure, I would suggest that you do a quick test on whether you can do other microscope operation using simple script like the one Jim posted previously:
http://emg.nysbc.org/boards/6/topics/447?r=450#message-450
If that gave you error, too, we have a more general problem.
Anchi
RE: camera related pyscope call such as windll not found when start leginon on the linux processing server - Added by Xing Meng over 13 years ago
Anchi
Thanks.
I remember I installed FEI Low-Dose Module not at the same time with other modules.
I re-run updatecom.py at the CCD pc.
The low-dose acquisition is working now.
Thanks again.