[GRASS-dev] [GRASS GIS] #2978: g.gui.gmodeler - no python script

#2978: g.gui.gmodeler - no python script
-------------------------------------+-------------------------
Reporter: lfurtkevicova | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.4
Component: wxGUI | Version: svn-trunk
Keywords: gmodeler, python script | CPU: x86-64
Platform: Unspecified |
-------------------------------------+-------------------------
I have a model, see attachment, and python editor (python script) is
totally empty.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2978&gt;
GRASS GIS <https://grass.osgeo.org>

#2978: g.gui.gmodeler - no python script
----------------------------+-------------------------------------
  Reporter: lfurtkevicova | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.4
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: gmodeler, python script
       CPU: x86-64 | Platform: Unspecified
----------------------------+-------------------------------------
Changes (by lfurtkevicova):

* Attachment "no_python_code.gxm" added.

model without python code

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2978&gt;
GRASS GIS <https://grass.osgeo.org>

#2978: g.gui.gmodeler - no python script
----------------------------+-------------------------------------
  Reporter: lfurtkevicova | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.6.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: gmodeler, python script
       CPU: x86-64 | Platform: Unspecified
----------------------------+-------------------------------------
Changes (by martinl):

* milestone: 7.0.7 => 7.6.2

Comment:

Still relevant.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2978#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#2978: g.gui.gmodeler - no python script exported
----------------------------+-------------------------------------------
  Reporter: lfurtkevicova | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.1
Component: wxGUI | Version: git-releasebranch78
Resolution: | Keywords: g.gui.gmodeler, python script
       CPU: x86-64 | Platform: Unspecified
----------------------------+-------------------------------------------
Changes (by neteler):

* keywords: gmodeler, python script => g.gui.gmodeler, python script
* milestone: 7.6.2 => 7.8.1
* version: svn-trunk => git-releasebranch78

Comment:

Re-tested in 7.8.git from today:

When using File > Export to Python, only the first lines of the Python
script are written, then these errors appear:

{{{
GRASS 7.8.1dev (nc_spm_08):~/Downloads > g.gui.gmodeler no_python_code.gxm
14:47:16: Debug: window wxTextCtrl(0x55f34b560c00, ) lost focus even
though it didn't have it
14:47:16: Debug: window wxTextCtrl(0x55f34b560c00, ) lost focus even
though it didn't have it
14:47:16: Debug: window wxTextCtrl(0x55f34b560c00, ) lost focus even
though it didn't have it
14:47:16: Debug: window wxTextCtrl(0x55f34b560c00, ) lost focus even
though it didn't have it
14:47:16: Debug: window wxTextCtrl(0x55f34b560c00, ) lost focus even
though it didn't have it
14:47:16: Debug: window wxTextCtrl(0x55f34b560c00, ) lost focus even
though it didn't have it
14:47:16: Debug: window wxTextCtrl(0x55f34b560c00, ) lost focus even
though it didn't have it
Traceback (most recent call last):
   File "/home/mneteler/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/frame.py", line 255, in OnPageChanged
     self.pythonPanel.RefreshScript()
   File "/home/mneteler/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/frame.py", line 2140, in RefreshScript
     WritePythonFile(fd, self.parent.GetModel())
   File "/home/mneteler/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/model.py", line 2521, in __init__
     self._writePython()
   File "/home/mneteler/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/model.py", line 2577, in _writePython
     for flag in item.GetParameterizedParams()['flags']:
AttributeError: 'ModelLoop' object has no attribute
'GetParameterizedParams'
14:47:16: Debug: window wxStyledTextCtrl(0x55f34b5af400, ) lost focus even
though it didn't have it
14:47:16: Debug: window wxStyledTextCtrl(0x55f34b5af400, ) lost focus even
though it didn't have it
14:47:16: Debug: window wxStyledTextCtrl(0x55f34b5af400, ) lost focus even
though it didn't have it
14:47:16: Debug: window wxStyledTextCtrl(0x55f34b5af400, ) lost focus even
though it didn't have it
14:47:16: Debug: window wxStyledTextCtrl(0x55f34b5af400, ) lost focus even
though it didn't have it
14:47:16: Debug: window wxStyledTextCtrl(0x55f34b5af400, ) lost focus even
though it didn't have it
14:47:16: Debug: window wxStyledTextCtrl(0x55f34b5af400, ) lost focus even
though it didn't have it
Traceback (most recent call last):
   File "/home/mneteler/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/frame.py", line 745, in OnExportPython
     filename = self.pythonPanel.SaveAs(force=True)
   File "/home/mneteler/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/frame.py", line 2103, in SaveAs
     WritePythonFile(fd, self.parent.GetModel())
   File "/home/mneteler/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/model.py", line 2521, in __init__
     self._writePython()
   File "/home/mneteler/software/grass78_git/dist.x86_64-pc-linux-
gnu/gui/wxpython/gmodeler/model.py", line 2577, in _writePython
     for flag in item.GetParameterizedParams()['flags']:
AttributeError: 'ModelLoop' object has no attribute
'GetParameterizedParams'
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2978#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>