Opened 12 years ago
Closed 11 years ago
#1888 closed defect (fixed)
r.terraflow won't run
Reported by: | pvanbosgeo | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.0 |
Component: | wxGUI | Version: | svn-trunk |
Keywords: | r.terraflow, forms | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
When trying to run r.terraflow I am getting the following error message:
Traceback (most recent call last): File "/usr/local/grass7/grass-7.0.svn/etc/gui/wxpython/lmg r/frame.py", line 730, in OnMenuCmd GUI(parent = self).ParseCommand(cmd) File "/usr/local/grass7/grass-7.0.svn/etc/gui/wxpython/gui _core/forms.py", line 2229, in ParseCommand get_dcmd = get_dcmd, layer = layer) File "/usr/local/grass7/grass-7.0.svn/etc/gui/wxpython/gui _core/forms.py", line 456, in __init__ frame = self) File "/usr/local/grass7/grass-7.0.svn/etc/gui/wxpython/gui _core/forms.py", line 1107, in __init__ txt3.SetValue(float(value)) # parameter previously set File "/usr/lib/python2.7/dist- packages/wx-2.8-gtk2-unicode/wx/lib/agw/floatspin.py", line 767, in SetValue if not self._textctrl or not self.InRange(value): File "/usr/lib/python2.7/dist- packages/wx-2.8-gtk2-unicode/wx/lib/agw/floatspin.py", line 1143, in InRange if (value < self._min): File "/usr/lib/python2.7/dist- packages/wx-2.8-gtk2-unicode/wx/lib/agw/floatspin.py", line 1446, in __cmp__ xn, yn, p = _norm(self, other) File "/usr/lib/python2.7/dist- packages/wx-2.8-gtk2-unicode/wx/lib/agw/floatspin.py", line 1597, in _norm y = FixedPoint(y, x.p) File "/usr/lib/python2.7/dist- packages/wx-2.8-gtk2-unicode/wx/lib/agw/floatspin.py", line 1320, in __init__ assert f == 0 or 0.5 <= f < 1.0 AssertionError
Change History (4)
comment:1 by , 12 years ago
Component: | Default → wxGUI |
---|---|
Keywords: | r.terraflow forms added |
comment:2 by , 12 years ago
follow-up: 4 comment:3 by , 11 years ago
The situation is following: in r55119 no answer is required which results in default answer infinity, then in r55484 we started to use wx.TextCtrl instead of wx.FloatSpinCtrl. Two simple solutions exist, either leave it as it is, or revert r55119 but instead of "infinity" use "inf" because forms.py use a Float validator for this text field and "inf" is a valid number. I think we could leave it as it is and close this ticket. Objections?
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to annakrat:
The situation is following: in r55119 no answer is required which results in default answer infinity, then in r55484 we started to use wx.TextCtrl instead of wx.FloatSpinCtrl. Two simple solutions exist, either leave it as it is, or revert r55119 but instead of "infinity" use "inf" because forms.py use a Float validator for this text field and "inf" is a valid number. I think we could leave it as it is and close this ticket. Objections?
no objections, so I close the ticket
The problem is that r.terraflow option d8cut has default value 'infinity'. The gui expects float and not string. Inside r.terraflow answer infinity means
I am not sure how to handle this special case. We can test 'infinity' string and set maximum value of the Float Spin instead (which is currently 1e9, but it can be increased).
Anna