Python error when trying to do a slope analysis in a DEM raster file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Python error when trying to do a slope analysis in a DEM raster file

larry mason
I know I should read the documentation just not sure where to find it. I'm trying to do a slope analysis of a DEM raster layer... I get the following python stack trace:

snip---------------

An error has occurred while executing Python code:

AttributeError: 'slope' object has no attribute 'preprocessParameters'

Traceback (most recent call last):
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\gui\menus.py", line 181, in
    action.triggered.connect(lambda: _executeAlgorithm(alg))
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\gui\menus.py", line 227, in _executeAlgorithm
    dlg = alg.createCustomParametersWidget(None)
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\gdal\GdalAlgorithm.py", line 62, in createCustomParametersWidget
    return GdalAlgorithmDialog(self)
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\gdal\GdalAlgorithmDialog.py", line 58, in __init__
    self.mainWidget().parametersHaveChanged()
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\gdal\GdalAlgorithmDialog.py", line 110, in parametersHaveChanged
    parameters = self.parent.getParameterValues()
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\gui\AlgorithmDialog.py", line 119, in getParameterValues
    return self.algorithm().preprocessParameters(parameters)
AttributeError: 'slope' object has no attribute 'preprocessParameters'


Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)]
QGIS version: 3.0.0-Girona Girona, 001c80b0c3


end snip-----------------------

So I'm wondering if I need to set anything up for QGIS is use python modules. Or where one sets up preprocessing Parameters. Any good tutorials on loading DEMs. configuring properties, and running analysis. Thanks,
Larry

 




Mailtrack Sender notified by
Mailtrack 07/09/18, 12:25:29 PM

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Python error when trying to do a slope analysis in a DEM raster file

Nyall Dawson
On Tue, 10 Jul 2018 at 03:29, larry mason <[hidden email]> wrote:

>
> I know I should read the documentation just not sure where to find it. I'm trying to do a slope analysis of a DEM raster layer... I get the following python stack trace:
>
> snip---------------
>
> An error has occurred while executing Python code:
>
> AttributeError: 'slope' object has no attribute 'preprocessParameters'
>
> Traceback (most recent call last):
>   File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\gui\menus.py", line 181, in
>     action.triggered.connect(lambda: _executeAlgorithm(alg))
>   File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\gui\menus.py", line 227, in _executeAlgorithm
>     dlg = alg.createCustomParametersWidget(None)
>   File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\gdal\GdalAlgorithm.py", line 62, in createCustomParametersWidget
>     return GdalAlgorithmDialog(self)
>   File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\gdal\GdalAlgorithmDialog.py", line 58, in __init__
>     self.mainWidget().parametersHaveChanged()
>   File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\gdal\GdalAlgorithmDialog.py", line 110, in parametersHaveChanged
>     parameters = self.parent.getParameterValues()
>   File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\gui\AlgorithmDialog.py", line 119, in getParameterValues
>     return self.algorithm().preprocessParameters(parameters)
> AttributeError: 'slope' object has no attribute 'preprocessParameters'
>
>

I can't reproduce, but this error looks odd to me. Can you try a clean
install and see if it helps?

Nyall
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Python error when trying to do a slope analysis in a DEM raster file

Frank Broniewski-6
In reply to this post by larry mason

Hi Larry,

 

it’s difficult to tell what went wrong without knowing the steps and the data you used. I just tried all the slope algorithms in the toolbox (gdal:slope, qgis:slope) and all work nicely here. I use QGIS 3 from the OSGeo4W-Installation … used a projected (in meters) SRTM scene and had no troubles running the slope algorithms.

 

Frank

 

Dipl. Geogr. Frank Broniewski

Waldhölzbacher Str. 51

66679 Losheim am See

06872 509 068 4

0176 611 26 9 2 6

www.frankbroniewski.com

 

 

 

Von: Qgis-user <[hidden email]> Im Auftrag von larry mason
Gesendet: Montag, 9. Juli 2018 19:29
An: [hidden email]
Betreff: [Qgis-user] Python error when trying to do a slope analysis in a DEM raster file

 

I know I should read the documentation just not sure where to find it. I'm trying to do a slope analysis of a DEM raster layer... I get the following python stack trace:

 

snip---------------

An error has occurred while executing Python code:

AttributeError: 'slope' object has no attribute 'preprocessParameters'

Traceback (most recent call last):
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\gui\menus.py", line 181, in
    action.triggered.connect(lambda: _executeAlgorithm(alg))
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\gui\menus.py", line 227, in _executeAlgorithm
    dlg = alg.createCustomParametersWidget(None)
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\gdal\GdalAlgorithm.py", line 62, in createCustomParametersWidget
    return GdalAlgorithmDialog(self)
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\gdal\GdalAlgorithmDialog.py", line 58, in __init__
    self.mainWidget().parametersHaveChanged()
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\algs\gdal\GdalAlgorithmDialog.py", line 110, in parametersHaveChanged
    parameters = self.parent.getParameterValues()
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\processing\gui\AlgorithmDialog.py", line 119, in getParameterValues
    return self.algorithm().preprocessParameters(parameters)
AttributeError: 'slope' object has no attribute 'preprocessParameters'


Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)]
QGIS version: 3.0.0-Girona Girona, 001c80b0c3

 

end snip-----------------------

 

So I'm wondering if I need to set anything up for QGIS is use python modules. Or where one sets up preprocessing Parameters. Any good tutorials on loading DEMs. configuring properties, and running analysis. Thanks,

Larry

 

 

 

 

 

Mailtrack

Sender notified by
Mailtrack 07/09/18, 12:25:29 PM

 


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

smime.p7s (7K) Download Attachment