Project

General

Profile

new Correction node problem

Added by Anonymous over 18 years ago

I can't use the custom camera configuration in the Correction Node any more. I'm using Leginon 1.2 and pyScope 1.0.5 and the problems seemed to have occurred subsequent to upgrading from SUSE 9.3 to SUSE 10.0. (I would be reluctant to downgrade back to SUSE 9.3 - party because it is not supported by the SUSE installation software but also because I think some other problems with the stability of Leginon appear to have disappeared.) What happens is I go to the Correction Node, press the Correction Settings button and then press the Custom button under Camera Configuration. Instead of allowing me to enter custom dimensions, offset and binning this does nothing in the GUI and Leginon outputs an error message:

Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/Leginon/gui/wx/Camera.py", line 205, in onCustomButton

dialog = CustomDialog(self, self.getGeometry())

File "/usr/lib/python2.4/site-packages/Leginon/gui/wx/Camera.py", line 346, in init

self.cxbinning = wx.Choice(self, -1, choices=parent.binnings['x'])

File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_controls.py", line 489, in init

newobj = controls.new_Choice(*args, **kwargs)

TypeError: String or Unicode type required

I would be grateful if you could look into this soon. I need the custom camera configuration to work as part of the overall solution to the earlier problems with X-ray spikes and (large numbers of) bad pixels in our CCD camera,

William


Replies (2)

- Added by Anonymous over 18 years ago

I've posted to Bugzilla about this problem together with a fix that seems to work locally (and which is hardly tested on the local system and not at all on other set ups than Leginon 1.2.0, pyScope 1.0.5, SUSE 10.0, etc),

William

- Added by Jim Pulokas over 18 years ago

thanks for the report

It looks like the latest version of wxPython is more strict about the initial list of items being strings. Your fix is what I would have done, so I just commited it to CVS so it will be in the next version. For anyone else who wants to apply the change directly, you need make the following changes to Leginon/gui/wx/Camera.py:

Change these lines (which generate the error):

self.cxbinning = wx.Choice(self, -1, choices=parent.binnings['x'])

self.cybinning = wx.Choice(self, -1, choices=parent.binnings['y'])

To this:

self.cxbinning = wx.Choice(self, -1, choices=map(str, parent.binnings['x']))

self.cybinning = wx.Choice(self, -1, choices=map(str, parent.binnings['y']))

    (1-2/2)