Actions
Bug #2722
closedcannot convert float NaN to integer in image panel display of invalid image
Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
Start date:
04/16/2014
Due date:
% Done:
0%
Estimated time:
Affected Version:
Appion/Leginon 2.1.0
Show in known bugs:
No
Workaround:
Description
Reported in Forum
Traceback (most recent call last): File "/usr/local/lib64/python2.6/site-packages/leginon/gui/wx/SelectionTool.py", line 158, in onDisplay self._setDisplayed(evt.name, evt.value) File "/usr/local/lib64/python2.6/site-packages/leginon/gui/wx/SelectionTool.py", line 152, in _setDisplayed self.parent.setImage(image) File "/usr/local/lib64/python2.6/site-packages/leginon/gui/wx/ImagePanel.py", line 297, in setImage self.setNumericImage(imagedata) File "/usr/local/lib64/python2.6/site-packages/leginon/gui/wx/ImagePanel.py", line 373, in setNumericImage self.contrasttool.setRange((stats['min'], stats['max']), value) File "/usr/local/lib64/python2.6/site-packages/leginon/gui/wx/ImagePanelTools.py", line 245, in setRange self.setSliders(value) File "/usr/local/lib64/python2.6/site-packages/leginon/gui/wx/ImagePanelTools.py", line 196, in setSliders self._setSliders(value) File "/usr/local/lib64/python2.6/site-packages/leginon/gui/wx/ImagePanelTools.py", line 179, in _setSliders self.minslider.SetValue(self.getSliderValue(value0)) File "/usr/local/lib64/python2.6/site-packages/leginon/gui/wx/ImagePanelTools.py", line 223, in getSliderValue return int(round((self.slidermax - self.slidermin)*scale + self.slidermin)) ValueError: cannot convert float NaN to integer
Updated by Anchi Cheng over 10 years ago
- Status changed from Assigned to In Test
- Priority changed from Urgent to High
Avoid the error by not displaying the image nor set slider in r18187 in trunk and r18188 in branch 3.0.
This does not resolve the bug that causes the image to give NaN stats such as dividing by zero, though.
This can not be tested positively. We will only know if anything get broken by the change.
Updated by Anchi Cheng almost 7 years ago
- Status changed from In Test to Closed
- Target version set to Appion/Leginon 3.1.0
Actions