tigrulya-exe / terraform

QGIS plugin with popular topographic correction algorithms and various methods of their evaluation
https://plugins.qgis.org/plugins/Terraform/
GNU General Public License v3.0
4 stars 2 forks source link

Multi-Criteria TOC Evaluation fails in .xlsx creation #1

Closed twest820 closed 5 months ago

twest820 commented 10 months ago

Happened to hit this when checking out Terraform's abilities in QGIS LTR. The rest of the plugin works fine except for an issue with ranking (filed separately).

QGIS version: 3.28.11-Firenze
QGIS code revision: b02458a196
Qt version: 5.15.3
Python version: 3.9.5
GDAL version: 3.7.2
GEOS version: 3.12.0-CAPI-1.18.0
PROJ version: Rel. 9.3.0, September 1st, 2023
PDAL version: 2.5.5 (git-version: 24f78d)
Algorithm started at: 2024-01-31T16:37:48
Algorithm 'Multi-criteria TOC evaluation' starting…
Input parameters:
{ 'CLASSIFICATION_MAP' : None, 'DEM' : '%DATAPATH%/DTM/s03960w06810.tif', 'INPUT' : '%DATAPATH%/orthoimage/s03960w06810.tif', 'METRICS' : [0,1,2,3,4,5,6], 'OUTPUT_DIR' : 'TEMPORARY_OUTPUT', 'SOLAR_AZIMUTH' : 241, 'SZA' : 37 }

Start evaluating group 1.
[QGIS processing]: calculating slope.
[QGIS processing]: calculating aspect.
[QGIS processing]: calculating luminance.
Group 1 evaluated.
Traceback (most recent call last):
File "%APPDATA%/QGIS/QGIS3\profiles\default/python/plugins\Terraform\processing_alg\topocorrection_eval\qgis_algorithm.py", line 97, in processAlgorithm
result = self._process_internal(parameters, execution_ctx, feedback)
File "%APPDATA%/QGIS/QGIS3\profiles\default/python/plugins\Terraform\processing_alg\topocorrection_eval\multi_criteria_eval.py", line 178, in _process_internal
output_files = self._export_results(ctx, scores_per_group, output_dir)
File "%APPDATA%/QGIS/QGIS3\profiles\default/python/plugins\Terraform\processing_alg\topocorrection_eval\multi_criteria_eval.py", line 220, in _export_results
self._export_to_excel(out_path, group_result)
File "%APPDATA%/QGIS/QGIS3\profiles\default/python/plugins\Terraform\processing_alg\topocorrection_eval\multi_criteria_eval.py", line 233, in _export_to_excel
writer.save()
AttributeError: 'XlsxWriter' object has no attribute 'save'
tigrulya-exe commented 8 months ago

@twest820 Hi! It looks like QGis has updated the version of pandas in the latest release, so there are some attribute related issues. I'll replace the deprecated methods used by Terraform and update the plugin in the repository

tigrulya-exe commented 5 months ago

@twest820 The issue was fixed, please update the plugin. Feel free to reopen the issue or create new ones if you encounter any problems.