Bug report #15559

Processing: Clip raster by mask (GDAL) throws an error if the output is a temporary file

Added by Filipe Dias almost 10 years ago. Updated almost 10 years ago.

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

Description

It works if the user selects "save to file".

2016-09-13T09:33:17 0 GDAL execution console output
2016-09-13T09:34:01 0 GDAL execution console output
2016-09-13T09:34:01 2 Error loading result layer:
Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/processing/gui/Postprocessing.py", line 75, in handleAlgorithmResults
out.name))
File "/usr/share/qgis/python/plugins/processing/tools/dataobjects.py", line 199, in load
+ '\
Check the processing framework log to look for errors')
RuntimeError: Could not load layer: /tmp/processing7a958fa4c8b246d492f2bfb458dc7fcb/d75a7af7c70740fb95780428b2fbf124/OUTPUT.tif
Check the processing framework log to look for errors

screenshot.png (287 KB) Filipe Dias, 2016-09-15 05:32 AM

issue.tar.gz (819 KB) Filipe Dias, 2016-09-15 05:32 AM

History

#1 Updated by Victor Olaya almost 10 years ago

just tried in master and it works

Can you confirm that the file is not created?

Aslo, other algorithms work when using temporary filenames?

#2 Updated by Filipe Dias almost 10 years ago

The file is correctly generated. I went to:

/tmp/processing7a958fa4c8b246d492f2bfb458dc7fcb/d61725a001ca42c39103e38932849a37

and loaded "Extent.tiff" into QGIS sucessfully.

It seems there is something wrong with the import

#3 Updated by Filipe Dias almost 10 years ago

I only tried this with GDAL Slope and works as expected

#4 Updated by Alexander Bruy almost 10 years ago

Are you sure that file correctly generated? Because path from your comment

/tmp/processing7a958fa4c8b246d492f2bfb458dc7fcb/d61725a001ca42c39103e38932849a37

is not the same as path in the error message
/tmp/processing7a958fa4c8b246d492f2bfb458dc7fcb/d75a7af7c70740fb95780428b2fbf124

#5 Updated by Filipe Dias almost 10 years ago

Yes, I am sure. The paths are different because I tried to run it a second time.

#6 Updated by Alexander Bruy almost 10 years ago

Works for me with QGIS 2.16.2 (7854fe2). Also tested with master and master_2 — same result, works fine.

#7 Updated by Filipe Dias almost 10 years ago

I've narrowed it down. With the attached files do the following:

- use "Polygon from layer extent" on "shape.shp" and save it as temporary file

- use the above temporary file in "Clip raster by mask layer"

- result in the screenshot

#8 Updated by Filipe Dias almost 10 years ago

#9 Updated by Victor Olaya almost 10 years ago

The error is that it is creating a Extent.tif file...while it should be called OUTPUT.tif

No idea why that is happening. I will check

#10 Updated by Alexander Bruy almost 10 years ago

This happens because of exporting vector layers (to handle selection) and updating command with new layer names/paths. Already fixed in master, master_2 and backported to 2.14 and 2.16. Please test with latest versions and report.

#11 Updated by Filipe Dias almost 10 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Great. I will keep and eye out for this bug in the next point release.

Also available in: Atom PDF