Bug #1050
closedsave frames option got back from regular ccd camera is assgned to None
0%
In my sandbox, I made _setSaveFrames function in gui/wx/Camera.py to replace value of None with False before SetValue()
Description
This affects pre 2.2 trunk.
This causes the preset can not be edited with the following error
Traceback (most recent call last):
File "/home/acheng/myami/leginon/gui/wx/PresetsManager.py", line 945, in onEditPreset
dialog = EditPresetDialog(self, preset, tems, ccd_cameras, self.node)
File "/home/acheng/myami/leginon/gui/wx/PresetsManager.py", line 134, in init
leginon.gui.wx.Dialog.Dialog.__init__(self, parent, title, 'Preset Parameters')
File "/home/acheng/myami/leginon/gui/wx/Dialog.py", line 44, in init
self.onInitialize()
File "/home/acheng/myami/leginon/gui/wx/PresetsManager.py", line 231, in onInitialize
self.setParameters(parameters)
File "/home/acheng/myami/leginon/gui/wx/PresetsManager.py", line 432, in setParameters
self.dicts['camera parameters'].setConfiguration(parameters)
File "/home/acheng/myami/leginon/gui/wx/Camera.py", line 377, in setConfiguration
self._setSaveFrames(value['save frames'])
File "/home/acheng/myami/leginon/gui/wx/Camera.py", line 201, in setSaveFrames
self.saveframes.SetValue(value)
File "/usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 385, in SetValue
return _controls.CheckBox_SetValue(*args, **kwargs)
TypeError: in method 'CheckBox_SetValue', expected argument 2 of type 'bool'
Updated by Anchi Cheng about 14 years ago
- Affected Version changed from Appion/Leginon 2.1.0 to Appion/Leginon 2.2.0 (trunk)
Updated by Jim Pulokas about 14 years ago
- Status changed from Assigned to In Code Review
- Assignee changed from Jim Pulokas to Anchi Cheng
r15053 includes a change in pyscope/ccdcamera.py to be sure that cameras that do not support the save frames method will return False if asked for it. The leginon Camera settings widget will accept any value now, which will be converted to a bool.
Updated by Anchi Cheng about 14 years ago
- Status changed from In Code Review to Closed
code checked and tested