Bug report #11750

Can't assign parent algorithms in Graphical Modeller due to Python error

Added by Jouko Jarnefelt almost 10 years ago. Updated almost 10 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/Modeller
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:19983

Description

Python error described below occurs after adding parent algorithms to any algorithm and returning back to the Graphical Modeller window. KeyError value of the error varies according to the first selected parent algorithm in the parent algorithms dialog box. Somewhat interesting is that in earlier versions of QGIS algoritms in the parent algorithm dialog box were given a number in front of them according to the order they are executed. In the latest version (and in master) this seems to be missing/disables and only the name of the algorithm is shown which makes it also hard to be sure in which algorithm the assigning should be done. Don't know if this has anything to do with the bug, but to be clear about the dialog box appearence I attached a picture. After python error you can still continue editing model, but if the model is saved it is broken and cannot be opened again in modeller.

An error has occured while executing Python code:

Traceback (most recent call last):
File "C:/OSGEO4~1/apps/qgis/./python/plugins\\processing\\modeler\\ModelerGraphicItem.py", line 353, in mousePressEvent
self.action()
File "C:/OSGEO4~1/apps/qgis/./python/plugins\\processing\\modeler\\ModelerGraphicItem.py", line 182, in editElement
self.model.updateModelerView()
File "C:/OSGEO4~1/apps/qgis/./python/plugins\\processing\\modeler\\ModelerAlgorithm.py", line 464, in updateModelerView
self.modelerdialog.repaintModel()
File "C:/OSGEO4~1/apps/qgis/./python/plugins\\processing\\modeler\\ModelerDialog.py", line 345, in repaintModel
self.scene.paintModel(self.alg)
File "C:/OSGEO4~1/apps/qgis/./python/plugins\\processing\\modeler\\ModelerScene.py", line 108, in paintModel
arrow = ModelerArrowItem(self.algItems[depend], -1,
KeyError: 'Select by expression'

Python version:
2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

---
Tested in all following versions:
OSGeo4W 2.6 (64bit)
Standalone 2.6 (64bit)
Master

parent_algorithm_pic.JPG (62 KB) Jouko Jarnefelt, 2014-11-26 11:50 PM

Associated revisions

Revision c52b5ae8
Added by Victor Olaya almost 10 years ago

[processing] fixed handling of parent algorihtms in modeler

Fixes #11750

History

#1 Updated by Giovanni Manghi almost 10 years ago

  • Affected QGIS version changed from 2.6.0 to master
  • Operating System deleted (Windows7)
  • OS version deleted (64bit)

it affects also master and other platforms.

#2 Updated by Victor Olaya almost 10 years ago

  • Status changed from Open to Closed

#3 Updated by Jouko Jarnefelt almost 10 years ago

Thanks for quick reply! I replaced current files with the bug fix files and I got new error when starting QGIS. This has something to do with the new ModelerDialog.py file.
...
File "C:/OSGEO4~1/apps/qgis/./python/plugins\\processing\\modeler\\ModelerDialog.py", line 36, in
from processing.gui.AlgorithmDialog import AlgorithmDialog
File "C:/OSGEO4~1/apps/qgis/./python\\qgis\\utils.py", line 460, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: No module named AlgorithmDialog

Should I reopen the ticket?

#4 Updated by Jouko Jarnefelt almost 10 years ago

  • Status changed from Closed to Reopened

I reopened the ticket because another problem still occurs.

#5 Updated by Alexander Bruy almost 10 years ago

  • Status changed from Reopened to Closed

Please open separate tickets for different issues.

Regarding your problem, it seems that you updated Processing only partially, while it is necessary to update it completely.

Also available in: Atom PDF