Skip to content

[Bug] g.gui.gmodeler cannot be run due to the history pane #3336

@pesekon2

Description

@pesekon2

Describe the bug

If you run anything in the gmodeler, it crashes due to its attempt to add the run to the newly added history pane. giface is missing and therefore there is no updateHistory method. The error message you'd get:

Traceback (most recent call last):
  File "/home/pesek/workspace/grass/dist.x86_64-pc-linux-gnu/gui/wxpython/gmodeler/frame.py", line 647, in OnRunModel
    self.model.Run(self._gconsole, self.OnModelDone, parent=self)
  File "/home/pesek/workspace/grass/dist.x86_64-pc-linux-gnu/gui/wxpython/gmodeler/model.py", line 697, in Run
    self.RunAction(item, params, log)
  File "/home/pesek/workspace/grass/dist.x86_64-pc-linux-gnu/gui/wxpython/gmodeler/model.py", line 611, in RunAction
    log.RunCmd(
  File "/home/pesek/workspace/grass/dist.x86_64-pc-linux-gnu/gui/wxpython/core/gconsole.py", line 499, in RunCmd
    self._giface.updateHistory.emit(cmd=cmd_save_to_history)
AttributeError: 'NoneType' object has no attribute 'updateHistory'

To Reproduce

  1. Start g.gui.gmodeler (from terminal or g.gui, doesn't matter)
  2. Add any module
  3. Click run

Expected behavior

Run.

System description:

  • GRASS GIS version: main (as of commit 5e86482)

Metadata

Metadata

Assignees

Labels

GUIwxGUI relatedPythonRelated code is in PythonbugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions