Opened 4 years ago

Last modified 2 days ago

#2978 new defect

g.gui.gmodeler - no python script exported

Reported by: lfurtkevicova Owned by: grass-dev@…
Priority: normal Milestone: 7.8.2
Component: wxGUI Version: git-releasebranch78
Keywords: g.gui.gmodeler, python script Cc:
CPU: x86-64 Platform: Unspecified

Description

I have a model, see attachment, and python editor (python script) is totally empty.

Attachments (1)

no_python_code.gxm (10.4 KB) - added by lfurtkevicova 4 years ago.
model without python code

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by lfurtkevicova

Attachment: no_python_code.gxm added

model without python code

comment:1 Changed 4 years ago by martinl

Milestone: 7.0.47.0.5

comment:2 Changed 3 years ago by neteler

Milestone: 7.0.57.0.6

comment:3 Changed 21 months ago by neteler

Milestone: 7.0.67.0.7

comment:4 Changed 7 months ago by martinl

Milestone: 7.0.77.6.2

Still relevant.

comment:5 Changed 3 weeks ago by neteler

Keywords: g.gui.gmodeler added; gmodeler removed
Milestone: 7.6.27.8.1
Summary: g.gui.gmodeler - no python scriptg.gui.gmodeler - no python script exported
Version: svn-trunkgit-releasebranch78

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'

comment:6 Changed 2 days ago by neteler

Milestone: 7.8.17.8.2

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.