Bug report #11434

Processing modeller error with modeller calculator

Added by Paolo Cavallini over 9 years ago. Updated over 9 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:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:19710

Description

Inserting the formula e+2*h, as in

http://docs.qgis.org/2.2/en/docs/training_manual/processing/modeler_hydro_calculator.html

results in an error; any other module in the model where I added this fails afterwards, even after restarting QGIS. I set this a high priority because it can break a model, thus destroying the work of an user.

Errore durante l'esecuzione di codice Python:

Traceback (most recent call last):
  File "/usr/share/qgis/python/plugins/processing/modeler/ModelerDialog.py", line 396, in addAlgorithm
    self._addAlgorithm(alg.getCopy())
  File "/usr/share/qgis/python/plugins/processing/modeler/ModelerDialog.py", line 415, in _addAlgorithm
    self.repaintModel()
  File "/usr/share/qgis/python/plugins/processing/modeler/ModelerDialog.py", line 345, in repaintModel
    self.scene.paintModel(self.alg)
  File "/usr/share/qgis/python/plugins/processing/modeler/ModelerScene.py", line 89, in paintModel
    item = ModelerGraphicItem(alg, model)
  File "/usr/share/qgis/python/plugins/processing/modeler/ModelerGraphicItem.py", line 59, in __init__
    self.pixmap = element.algorithm.getIcon().pixmap(15, 15)
  File "/usr/share/qgis/python/plugins/processing/modeler/ModelerAlgorithm.py", line 105, in algorithm
    self._algInstance = ModelerUtils.getAlgorithm(self.consoleName).getCopy();
AttributeError: 'NoneType' object has no attribute 'getCopy'

Versione Python:
2.7.8 (default, Oct  7 2014, 18:01:07) 
[GCC 4.9.1]

Versione di QGIS:
2.5.0-Master Master, exported

History

#1 Updated by Giovanni Manghi over 9 years ago

  • Priority changed from Normal to Severe/Regression
  • Affected QGIS version changed from 2.4.0 to master

tagging as blocker as it used to work as expected.

#2 Updated by Salvatore Larosa over 9 years ago

  • Status changed from Open to Feedback

I cannot confirm or maybe I did not manage to reproduce the issue. I done some test by using that formula but the algorithm ending successful.

Is there any use case to reproduce this issue?

#3 Updated by Giovanni Manghi over 9 years ago

Salvatore Larosa wrote:

I cannot confirm or maybe I did not manage to reproduce the issue. I done some test by using that formula but the algorithm ending successful.

Is there any use case to reproduce this issue?

hard to say, because that model does not show in qgis 2.4 (after having it imported from the models repository) and in QGIS master fails to run

Error executing algorithm Catchment Area ModelerAlgorithm instance has no attribute 'algOutputs' See log for more details

#4 Updated by Giovanni Manghi over 9 years ago

I also noticed that the formulas entered in the modeller only tool "calculator" do not show when editing the model clicking on that specific operation.

#5 Updated by Salvatore Larosa over 9 years ago

Giovanni Manghi wrote:

hard to say, because that model does not show in qgis 2.4 (after having it imported from the models repository) and in QGIS master fails to run

Error executing algorithm Catchment Area ModelerAlgorithm instance has no attribute 'algOutputs' See log for more details

sorry Giovanni, but I'm not sure I understand what you want to say, did you mean that alg is not present in 2.4? or is hard to say this issue is a blocker one?

The catchment area algorithm works fine for me in master.

#6 Updated by Giovanni Manghi over 9 years ago

Error executing algorithm Catchment Area ModelerAlgorithm instance has no attribute 'algOutputs' See log for more details

sorry Giovanni, but I'm not sure I understand what you want to say, did you mean that alg is not present in 2.4? or is hard to say this issue is a blocker one?

The catchment area algorithm works fine for me in master.

Hi Salvatore,

the example model that is subject of this ticket was shipped as part of qgis 2.2/processing, and is available out of the box in the "example models" group. The operation described in the manual works as expected (using the modeller only tool "Calculator").

In QGIS 2.4/2.6 example models are available in a repository, you can download them with the tool "get models from on line script collection". However this model will not show in QGIS 2.4 and now will fail to work (above error posted by me) on master.

This make hard to test now for the described issue, that the modeller only tool "Calculator" breaks the models.

cheers!

#7 Updated by Giovanni Manghi over 9 years ago

  • Status changed from Feedback to Closed
  • Resolution set to fixed/implemented

works as expected in qgis 2.6

#8 Updated by Paolo Cavallini over 9 years ago

  • Status changed from Closed to Reopened
  • Priority changed from Severe/Regression to Normal

The error is no longer there; however, if I edit the calculator block, adding the formula, click OK, then edit again, the formula has disappeared.

#9 Updated by Giovanni Manghi over 9 years ago

  • Status changed from Reopened to Closed

Paolo Cavallini wrote:

The error is no longer there; however, if I edit the calculator block, adding the formula, click OK, then edit again, the formula has disappeared.

right, however this is a different issue, so please open a new ticket.

Also available in: Atom PDF