2

I have a problem with processing plugin of QGIS 2.13 and in particular with its Modeler.

When I have tried an operation, this is the log error:

*An error has occurred while executing Python code: 
AttributeError: 'NoneType' object has no attribute 'getCopy' 
Traceback (most recent call last):
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\modeler\ModelerDialog.py", line 424, in addAlgorithm
    self._addAlgorithm(alg.getCopy())
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\modeler\ModelerDialog.py", line 443, in _addAlgorithm
    self.repaintModel()
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\modeler\ModelerDialog.py", line 374, in repaintModel
    self.scene.paintModel(self.alg)
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\modeler\ModelerScene.py", line 91, in paintModel
    item = ModelerGraphicItem(alg, model)
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\modeler\ModelerGraphicItem.py", line 60, in __init__
    self.pixmap = element.algorithm.getIcon().pixmap(15, 15)
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\modeler\ModelerAlgorithm.py", line 121, in algorithm
    self._algInstance = algList.getAlgorithm(self.consoleName).getCopy()
AttributeError: 'NoneType' object has no attribute 'getCopy'
Versione Python: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] 
Versione di QGIS: 2.18.13 Las Palmas, 8cba0bb9eb 
***Path di Python:
C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing
C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python
C:/Users/Giuseppe Cillis/.qgis2/python
C:/Users/Giuseppe Cillis/.qgis2/python/plugins
C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins
C:\PROGRA~1\QGIS2~1.18\bin\python27.zip
C:\PROGRA~1\QGIS2~1.18\apps\Python27\DLLs
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\plat-win
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\lib-tk
C:\PROGRA~1\QGIS2~1.18\bin
C:\PROGRA~1\QGIS2~1.18\apps\Python27
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Pythonwin
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\wx-2.8-msw-unicode
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg
C:/Users/Giuseppe Cillis/.qgis2//python*

I tried to unistall and install and I also tried to delete .qgis2 folder .

How can I solve this problem?

  • It might help if you add which operation you try to perform, on which geometry type (point/line/polygon/ratser) and which source file type (shapefile/CSV/WMS/tif etc). – AndreJ Sep 30 '17 at 5:23
  • I tried an operation with model builder ; parameters "number" and an exclusive algorithm – Giuseppe Cillis Sep 30 '17 at 8:30
  • @GiuseppeCillis There is a blank space in the user folder: is this the first time you are trying to run a model? – mgri Sep 30 '17 at 18:00
  • No, some months ago, the model builder ran – Giuseppe Cillis Sep 30 '17 at 20:47
3

I had this problem a while back. "AttributeError: 'NoneType' object has no attribute 'getCopy'" shows up if you are trying to open a model in the model editor that contains an algorithm which Processing cannot find.

For example, when I upgraded to Ubuntu 16.04, installing a fresh QGIS version did not automatically install SAGA. Therefore, any model with a dependency on SAGA was broken with the above error message. Installing SAGA and restarting QGIS solves the issue.

  • I tried to installing and unistall in different ways but I haven't solved – Giuseppe Cillis Sep 30 '17 at 20:48
  • Do you know which tools were used in the model and are all those tools available in your current toolbox? Reinstalling QGIS won't necessarly fix all dependencies such as SAGA, GRASS, ... – underdark Oct 1 '17 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.