Bug report #14719

GRASS 7 algorithms does not work in the graphical modeller (python error)

Added by Oto Kalab almost 4 years ago. Updated about 2 years ago.

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

Description

If I try to run model including GRASS 7 algorithm it fails. Tried several functions (r.reclass, r.recode, r.grow...). It works fine from processing toolbox.

An error has occurred while executing Python code: 

TypeError: object.__new__(NotImplementedType) is not safe, use NotImplementedType.__new__() 
Traceback (most recent call last):
  File "/usr/share/qgis/python/plugins/processing/modeler/ModelerDialog.py", line 247, in runModel
    alg = self.alg.getCopy()
  File "/usr/share/qgis/python/plugins/processing/modeler/ModelerAlgorithm.py", line 201, in getCopy
    newone.algs = copy.deepcopy(self.algs)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 298, in _deepcopy_inst
    state = deepcopy(state, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 298, in _deepcopy_inst
    state = deepcopy(state, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 230, in _deepcopy_list
    y.append(deepcopy(a, memo))
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 298, in _deepcopy_inst
    state = deepcopy(state, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
    state = deepcopy(state, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
    y = copier(x, memo)
  File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/usr/lib/python2.7/copy.py", line 329, in _reconstruct
    y = callable(*args)
  File "/usr/lib/python2.7/copy_reg.py", line 93, in __newobj__
    return cls.__new__(cls, *args)
TypeError: object.__new__(NotImplementedType) is not safe, use NotImplementedType.__new__()

Python version: 2.7.6 (default, Jun 22 2015, 18:01:27) [GCC 4.8.2] 
QGIS version: 2.14.1-Essen Essen, exported 

Python Path:
/home/otak/.qgis2/python/plugins/GeoCoding/libs
/usr/share/qgis/python/plugins/processing
/home/otak/.qgis2/python/plugins/QSDM
/home/otak/.qgis2/python/plugins/LecoS
/usr/share/qgis/python
/home/otak/.qgis2/python
/home/otak/.qgis2/python/plugins
/usr/share/qgis/python/plugins
/usr/local/lib/python2.7/dist-packages/utils-0.8.0-py2.7.egg
/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/PILcompat
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/pymodules/python2.7
/usr/lib/python2.7/dist-packages/ubuntu-sso-client
/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode
/home/otak/.qgis2//python
/home/otak/.qgis2/python/plugins/mmqgis/forms
/home/otak/.qgis2/python/plugins/qgisgbifapi/vendor
/home/otak/.qgis2/python/plugins/qgisgbifapi/vendor
/usr/share/qgis/python/plugins/fTools/tools
/home/otak/Mega/GIS/Projects/steto

History

#1 Updated by James Stott almost 4 years ago

I have exactly the same problem trying to run a Grass 7 algorithm (v.voronoi) on Ubuntu Gnome using QGIS 2.14.3. I get the error when trying to run the model, while the algorithms run from the processing toolbox.

Model works fine on my work Windows 10 work computer.

An error has occurred while executing Python code:

TypeError: object.__new__(NotImplementedType) is not safe, use NotImplementedType.__new__()
Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/processing/modeler/ModelerDialog.py", line 247, in runModel
alg = self.alg.getCopy()
File "/usr/share/qgis/python/plugins/processing/modeler/ModelerAlgorithm.py", line 201, in getCopy
newone.algs = copy.deepcopy(self.algs)
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 257, in deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 298, in _deepcopy_inst
state = deepcopy(state, memo)
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 298, in _deepcopy_inst
state = deepcopy(state, memo)
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 230, in _deepcopy_list
y.append(deepcopy(a, memo))
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 298, in _deepcopy_inst
state = deepcopy(state, memo)
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.7/copy.py", line 334, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.7/copy.py", line 329, in _reconstruct
y = callable(*args)
File "/usr/lib/python2.7/copy_reg.py", line 93, in newobj
return cls.
_new__(cls, *args)
TypeError: object.__new__(NotImplementedType) is not safe, use NotImplementedType.__new__()

Python-versjon: 2.7.10 (default, Oct 14 2015, 16:09:02) [GCC 5.2.1 20151010]
QGIS-versjon: 2.14.3-Essen Essen, exported

Python-sti:
/usr/share/qgis/python/plugins/processing
/home/james/.qgis2/python/plugins/ScipyPointClustering
/usr/share/qgis/python
/home/james/.qgis2/python
/home/james/.qgis2/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/PILcompat
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/python2.7/dist-packages/ubuntu-sso-client
/usr/lib/python2.7/dist-packages/wx-3.0-gtk2
/home/james/.qgis2//python
/home/james/.qgis2/python/plugins/mmqgis/forms
/usr/share/qgis/python/plugins/fTools/tools
/home/james/testing/model

#2 Updated by Bernd Vogelgesang over 3 years ago

Same effect here on a model with Linux Mint I created and successfully ran with 2.14. After upgrading to 2.16, it shows the same errors as above.

#3 Updated by Giovanni Manghi almost 3 years ago

  • Easy fix? set to No
  • Regression? set to No

#4 Updated by Emilio Gomez over 2 years ago

The same problem with a model created and executed in QGIS 2.16 in Kubuntu 16.04 Xenial.
It works well from processing toolbox but produces this error if the model is executed from modeler dialog.

If the GRASS 7 algorithm (v.clean) is removed from the model, the error does not occur.

#5 Updated by Giovanni Manghi over 2 years ago

  • Description updated (diff)
  • Status changed from Open to Feedback

Emilio Gomez wrote:

The same problem with a model created and executed in QGIS 2.16 in Kubuntu 16.04 Xenial.
It works well from processing toolbox but produces this error if the model is executed from modeler dialog.

If the GRASS 7 algorithm (v.clean) is removed from the model, the error does not occur.

please try again with 2.81.14 (be also sure to not have any "processing" folder in ~/.qgis2/python/plugins) then report back. Thanks!

#6 Updated by Alexander Bruy about 2 years ago

  • Status changed from Feedback to Closed

Closed for the lack of feedback. Please reopen if necessary.

#7 Updated by Giovanni Manghi about 2 years ago

  • Resolution set to not reproducable

Also available in: Atom PDF