Bug report #13590

Processing: `Hypsometry` fails

Added by Paolo Cavallini over 8 years ago. Updated over 8 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/SAGA
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21632

Description

Avvio dell'algoritmo Hypsometry...
ta_morphometry "Hypsometry" -ELEVATION "/tmp/processing/ea1f185a117b4065a79803f7c0087d24/OUTPUT.sgrd" -COUNT 100 -SORTING 0 -METHOD 0 -BZRANGE true -ZRANGE_MIN 0 -ZRANGE_MAX 1000 -TABLE "/tmp/processing/48f439b1e7bb4bd9991b249a4224bd45/TABLE.csv"
____________________

  1. ## ##### ##
  1. ### ## ###
  2. # ## ## #### # ##
  3. ##### ## # #####
    1. # ## ##### # ##
      ____________________

SAGA Version: 2.2.1

____________________
library path: /usr/lib/x86_64-linux-gnu/saga/
library name: libta_morphometry
library : Morphometry
tool : Hypsometry
author : (c) 2001 by O.Conrad
processors : 4 [4]
____________________

Load grid: /tmp/processing/ea1f185a117b4065a79803f7c0087d24/OUTPUT.sgrd...

Parameters

Grid system: 25; 215x 183y; 262884.025725x 4454062.5y
Elevation: OUTPUT
Hypsometry: Hypsometry
Number of Classes: 100
Sort: up
Classification Constant: height
Use Z-Range: yes
Z-Range: [0.000000] - [1000.000000]

Create index: OUTPUT

local variable 'prjFile' referenced before assignment See log for more details

Which gives:

Traceback (most recent call last):| File "/usr/share/qgis/python/plugins/processing/core/GeoAlgorithm.py", line 230, in execute| self.processAlgorithm(progress)| File "/usr/share/qgis/python/plugins/processing/algs/saga/SagaAlgorithm213.py", line 200, in processAlgorithm| with open(prjFile, "w") as f:|UnboundLocalError: local variable 'prjFile' referenced before assignment|

Associated revisions

Revision 5ca55667
Added by Victor Olaya over 8 years ago

[processing] do not write CRS file if output is not a layer

fixes #13590

History

#1 Updated by Victor Olaya over 8 years ago

  • Status changed from Open to Closed

#2 Updated by Paolo Cavallini over 8 years ago

  • Status changed from Closed to Reopened

In my case, this happens with saga 2.2.1: should we change the relevant file there too?
Thanks Victor.

#3 Updated by Victor Olaya over 8 years ago

that part of the code is reused for all saga calls, so that should fix it for 2.2.0 or higher

#4 Updated by Paolo Cavallini over 8 years ago

  • Status changed from Reopened to Closed

Oh, I see, it's using SagaAlgorithm213.py
Sorry for the noise.

Also available in: Atom PDF