lutraconsulting / qgis-xyz-tiles

A processing algorithm to generate xyz tiles from map/layer extent.
GNU General Public License v2.0
20 stars 12 forks source link

'TilesXYZAlgorithmDirectory' object has no attribute 'parameterAsBoolean' #11

Closed mentaljam closed 5 years ago

mentaljam commented 5 years ago

Hi,

Thank you for the plugin!

After the last update (v0.3) I'm not able to run tiles generation. Here is the log:

QGIS version: 3.6.3-Noosa
QGIS code revision: 0c5774c068
Qt version: 5.11.2
GDAL version: 2.4.1
GEOS version: 3.7.2-CAPI-1.11.0 b55d2125
PROJ version: 520
...
Traceback (most recent call last):
File "C:/Users/tsymbarovich_pr/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\tiles_xyz\tiles_xyz_algorithm.py", line 485, in processAlgorithm
is_tms = self.parameterAsBoolean(parameters, self.TMS_CONVENTION, context)
AttributeError: 'TilesXYZAlgorithmDirectory' object has no attribute 'parameterAsBoolean'
mentaljam commented 5 years ago

I've checked the API documentation. The QgsProcessingParameters::parameterAsBoolean method was introduced in QGIS 3.8. I think the solution is to switch to QgsProcessingParameters::parameterAsBool or set the minimum required QGIS version in the metadata file.