Preset attributes not acessable
Added by Bob Grassucci about 11 years ago
When I try to look at the preset attributes they do not show up and I get the following error. We recently updated to correct the problems related to the gain correction errors. See error below from when I started Leginon.
/catalina.raid.F30/frames> start-leginon.py &
[1] 5743
/catalina.raid.F30/frames> /usr/lib64/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/_core.py:14512: UserWarning: wxPython/wxWidgets release number mismatch
warnings.warn("wxPython/wxWidgets release number mismatch")
Leginon version: pre3.0
name
name
name
name
name
name
name
name
name
name
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/leginon/gui/wx/PresetsManager.py", line 1098, in onEditPreset
tems[tem_name]['probe modes'] = tem.ProbeModes
File "/usr/local/lib/python2.7/site-packages/leginon/remotecall.py", line 215, in getattr
raise AttributeError('attribute %s not in descripition' % name)
AttributeError: attribute ProbeModes not in descripition
Replies (14)
RE: Preset attributes not acessable - Added by Anchi Cheng about 11 years ago
I guess you just did an update to head, and therefore picked up a new change of mine that allows change to nano probe mode. Details still need to be worked out on how to use that properly.
Follow Run Database Update Script. You will find new database updates that you need to do. You should be fine after that. Also don't forget to update the pyscope and leginon on the scope-side for this new change.
RE: Preset attributes not acessable - Added by Bob Grassucci about 11 years ago
We updated as suggested and get new error. See below
/home/leginon> start-leginon.py &
[1] 8688
/home/leginon> /usr/lib64/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/_core.py:14512: UserWarning: wxPython/wxWidgets release number mismatch
warnings.warn("wxPython/wxWidgets release number mismatch")
Leginon version: pre3.0
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/leginon/gui/wx/PresetsManager.py", line 1099, in onEditPreset
tems[tem_name]['probe modes'] = tem.ProbeModes
File "/usr/local/lib/python2.7/site-packages/leginon/remotecall.py", line 215, in getattr
raise AttributeError('attribute %s not in descripition' % name)
AttributeError: attribute ProbeModes not in descripition
RE: Preset attributes not acessable - Added by Bob Grassucci about 11 years ago
I just tried getting the preset settings from the scope after the update then trying to edit them but got the same error. The probe mode does not seem to be getting passed. Is there a way to back date to get to a working version if it is not a quick fix?
RE: Preset attributes not acessable - Added by Anchi Cheng about 11 years ago
It is possible that your update on the scope is not the one used.
On Microscope computer, start python command line and then check where it imports pyscope from like this:
import pyscope pyscope
If the path print out include site-packages, but you did not svn update in there, use Windows command prompt to
repeat the package installation one by one as in Install the packages you downloaded from NRAMM svn repository
If you want to go back to specific version of svn
svn update -r <the version you want to go back to>
Update to specific past version does create a slight problem in future update but I can talk you through that when it comes.
RE: Preset attributes not acessable - Added by Harry Kao about 11 years ago
We ran the updatecom.py on the microscope computer and got the following error msg:
--------------------------
C:\Python25\Lib\site-packages\pyscope>c:\Python25\python.exe updatecom.py
Generating .py files from type libraries...
initializing TEM Scripting done.
initializing Tecnai Scripting Error, cannot find typelib for "Tecnai Scripting"
initializing TOM Moniker done.
initializing Tecnai Low Dose Kit done.
initializing Tecnai Exposure Adaptor done.
initializing Gatan CCD Camera done.
initializing Tietz CCD Camera done.
initializing TIA CCD Camera done.
enter to quit.
RE: Preset attributes not acessable - Added by Anchi Cheng about 11 years ago
Harry,
It is fine. A given FEI scope only has either TEM Scripting or Tecnai Scripting. One of the type .py file generation has to fail.
In updating the python script with existing installation, the python installer will not remove content in the installation location. Therefore, you only need to do the single step of running python installer, not the subsequent steps in the wiki page.
RE: Preset attributes not acessable - Added by Bob Grassucci about 11 years ago
We are still getting the same errors. See below:
/home/leginon> start-leginon.py &
[1] 9649
/home/leginon> /usr/lib64/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/_core.py:14512: UserWarning: wxPython/wxWidgets release number mismatch
warnings.warn("wxPython/wxWidgets release number mismatch")
Leginon version: pre3.0
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/leginon/gui/wx/PresetsManager.py", line 1099, in onEditPreset
tems[tem_name]['probe modes'] = tem.ProbeModes
File "/usr/local/lib/python2.7/site-packages/leginon/remotecall.py", line 215, in getattr
raise AttributeError('attribute %s not in descripition' % name)
AttributeError: attribute ProbeModes not in descripition
We want to go back. What version should we go to?
RE: Preset attributes not acessable - Added by Anchi Cheng about 11 years ago
go back to r17899 It is shown in the link of the automatic e-mail through the redmine issue for future reference.
Check for me before you do this in your microscope installation pyscope/tecnai.py for lines like
def getProbeModes(self):
This has been used here and another place for over a week. Shouldn't be this bad.
RE: Preset attributes not acessable - Added by Harry Kao about 11 years ago
I searched for getProbeModes in tecnai.py on the microscope computer, but did not find anything. This particular tecnai.py is dated 2/5/2013
RE: Preset attributes not acessable - Added by Anchi Cheng about 11 years ago
That means it did not get updated.
I see that the wiki link put the title at the top. Make sure, if you still want to try this later, you are running that part, meaning
- Install the package in each folder with commands such as
cd Your_Download_Place\myami\leginon c:\\python27\python.exe setup.py install
The minimal packages you need update is leginon and pyscope.
RE: Preset attributes not acessable - Added by Harry Kao about 11 years ago
the svn software on the microscope shows r17923, but can't seem to pull all the files. I copied leginon and pyscope directories from the K2 computer and ran the "setup.py install" commands, followed by updatecom.py in pyscope. Now we are getting the following error on the microscope computer when starting the laucher:
--------------
C:\Python25\Lib\site-packages\leginon>c:\Python25\python.exe launcher.py
c:\Python25\lib\warnings.py:41: RuntimeWarning: numpy.ufunc size changed, may in
dicate binary incompatibility
lineno = caller.f_lineno
Traceback (most recent call last):
File "launcher.py", line 14, in <module>
import noderegistry
File "c:\Python25\Lib\site-packages\leginon\noderegistry.py", line 33, in <mod
ule>
import leginon.allnodes
File "c:\Python25\Lib\site-packages\leginon\allnodes.py", line 13, in <module>
from presets import PresetsManager
File "c:\Python25\Lib\site-packages\leginon\presets.py", line 23, in <module>
import gui.wx.PresetsManager
File "c:\Python25\Lib\site-packages\leginon\gui\wx\PresetsManager.py", line 24
, in <module>
import leginon.gui.wx.Camera
File "c:\Python25\Lib\site-packages\leginon\gui\wx\Camera.py", line 12, in <mo
dule>
from pyami import primefactor
ImportError: cannot import name primefactor
C:\Python25\Lib\site-packages\leginon>
RE: Preset attributes not acessable - Added by Anchi Cheng about 11 years ago
Sorry, need pyami, too.
RE: Preset attributes not acessable - Added by Harry Kao about 11 years ago
I created a new directory, pulled all the files of r17923, went through 'setup.py install' for pyscope, legion, and pyami, on the microscope computer. Now the preset window can be retrieved. Thank you Anchi.
Still a mystery why svn update can't pull the right files on the microscope computer, but worked on the K2 and myamiweb computers.
RE: Preset attributes not acessable - Added by Anchi Cheng about 11 years ago
It is possible that the last update was to a specific revision (The minor problem I said you would have if doing so). Tortoise svn pull-down menu that you get by right-clicking on the check-out myami folder has a menu item called "update to revision...". Once in there, you can choose to update to HEAD. That should save to its configuration so that it would get it right next time.