Bug report #20281

Updated by Jürgen Fischer about 6 years ago

In continuation of Bug report #20146,
QGIS 3.4 Madeira and GRASS 7. r.texture does not provide any output. Not in temp, not in user defined folder.
I have tried the function in Windows 10 64bit. On the same systems, QGIS 2.18 provided the outputs fine.

LOG outputs are like this:

Suspicious message _"r was unexpected at this time."_

<pre>
Algorithm
@Algorithm 'r.texture' starting…
Input parameters:
{ '-a' : False, '-s' : False, 'GRASS_REGION_CELLSIZE_PARAMETER' : 0, 'GRASS_REGION_PARAMETER' : None, 'distance' : 1, 'input' : 'C:/Users/…/asdf.tif', 'method' : [0], 'output' : 'C:\\Users\\...\\TESTFOLDER\\qw', 'size' : 3 }

r.external input="C:\Users\...\asdf.tif" band=1 output="rast_5bd897a9cae473" --overwrite -o
g.region n=… s=… e=… w=… res=0.0891700128040893
r.texture input=rast_5bd897a9cae473 method="asm" size=3 distance=1 output=outputbf78f3ac0afc498ca24722f3e2ee97ec --overwrite
for r in $(g.list type=rast pattern='outputbf78f3ac0afc498ca24722f3e2ee97ec*'); do
r.out.gdal -m -t input=${r} output=C:\Users\...\TESTFOLDER\qw/${r}.tif --overwrite -c createopt="TFW=YES,COMPRESS=LZW"
done
Starting GRASS GIS...
WARNING: Concurrent mapset locking is not supported on Windows
Executing <C:\Users\...\AppData\Local\Temp\processing_99d8c583f2914262bb9d62de6da82492\grassdata\grass_batch_job.cmd> ...

C:\OSGEO4~1\bin>chcp 1252 1>NUL

C:\OSGEO4~1\bin>r.external input="C:\Users\...\Desktop\QGIS_BARESOIL_2018\TESTFOLDER\asdf.tif" band=1 output="rast_5bd897a9cae473" --overwrite -o
Over-riding projection check
Reading band 1 of 1...
r.external complete. Link to raster map <rast_5bd897a9cae473> created.

C:\OSGEO4~1\bin>g.region n=… s=… e=… w=… res=0.0891700128040893

C:\OSGEO4~1\bin>r.texture input=rast_5bd897a9cae473 method="asm" size=3 distance=1 output=outputbf78f3ac0afc498ca24722f3e2ee97ec --overwrite
Reading raster map...
Calculating Angular Second Moment...
2..5..8..11..14..17..20..23..26..29..32..35..38..41..44..47..50..53..56..59..62..65..68..71..74..77..80..83..86..89..92..95..98..100
r was unexpected at this time.

C:\OSGEO4~1\bin>for r in $(g.list type=rast pattern='outputbf78f3ac0afc498ca24722f3e2ee97ec*'); do
Execution of <C:\Users\...\AppData\Local\Temp\processing_99d8c583f2914262bb9d62de6da82492\grassdata\grass_batch_job.cmd> finished.
Cleaning up temporary files...
Press any key to continue . . .
Traceback (most recent call last):
File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Algorithm.py", line 411, in processAlgorithm
Grass7Utils.executeGrass(self.commands, feedback, self.outputCommands)
File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Utils.py", line 399, in executeGrass
startupinfo=si if isWindows() else None
File "C:\OSGEO4~1\apps\Python37\lib\subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "C:\OSGEO4~1\apps\Python37\lib\subprocess.py", line 1155, in _execute_child
startupinfo)
OSError: [WinError 87] The parameter is incorrect
Execution failed after 14.01 seconds

Loading resulting layers
Algorithm 'r.texture' finished
</pre> @

From the history in QGIS 3.4 FAILURE:
<pre>
processing.run("grass7:r.texture", {'input':'C:/Users/.../asdf.tif','method':[0],'size':3,'distance':1,'-s':False,'-a':False,'output':'C:\\Users\\...\\TESTFOLDER\\qw','GRASS_REGION_PARAMETER':None,'GRASS_REGION_CELLSIZE_PARAMETER':0})
</pre>
@processing.run(&quot;grass7:r.texture&quot;, {&#39;input&#39;:&#39;C:/Users/.../asdf.tif&#39;,&#39;method&#39;:[0],&#39;size&#39;:3,&#39;distance&#39;:1,&#39;-s&#39;:False,&#39;-a&#39;:False,&#39;output&#39;:&#39;C:\\Users\\...\\TESTFOLDER\\qw&#39;,&#39;GRASS_REGION_PARAMETER&#39;:None,&#39;GRASS_REGION_CELLSIZE_PARAMETER&#39;:0})@

From the history in QGIS 2.18.25 SUCCESS:
<pre>
processing.runalg("grass7:r.texture","C:/Users/.../asdf.tif","asm",3,1,False,False,"...,...,...,...","C:\\Users\\...\\TESTFOLDER\\qw")
</pre>

Back