Bug report #20277

GRASS vector tools do not work anymore if the datasource has "...|layername=nameofthelayer" in it

Added by Giovanni Manghi over 5 years ago. Updated over 5 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Processing/GRASS
Affected QGIS version:3.4.0 Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28098

Description

This includes any file based multi layer source (i.e. geopackage) as also shapefiles when added by a "export as..." operation.

Major regression as it makes very hard to use any vector GRASS tool.

Associated revisions

Revision f65c845f
Added by Nyall Dawson over 5 years ago

[processing][GRASS] Correctly handle input vector layers with |layername= param

Fixes #20277

Revision 57a0bad9
Added by Nyall Dawson over 5 years ago

[processing][GRASS] Correctly handle input vector layers with |layername= param

Fixes #20277

(cherry picked from commit f65c845f86a9742602b72584b34b6ae63ed30dd7)

History

#1 Updated by Alexandre Neto over 5 years ago

Confirmed on Windows 10 with a geopackage layer.

#2 Updated by Nyall Dawson over 5 years ago

  • Status changed from Open to Feedback

Is this actually a regression in the grass provider? My suspicion is that the provider never handled the layername parameter, and it's just a (bigger) issue now because we always use layername= urls for OGR layers. It could be tested by running a grass alg in 3.2.3 with multi-layer geopackage input.

#3 Updated by Giovanni Manghi over 5 years ago

Nyall Dawson wrote:

Is this actually a regression in the grass provider?

Hi Nyall,
if you are asking if it is working in 2.18 then the answer is yes.

#4 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Feedback to Open

#5 Updated by Pedro Venâncio over 5 years ago

Confirmed also here with a geopackage

Traceback (most recent call last):
File "C:/PROGRA~1/QGIS 3.4/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Algorithm.py", line 411, in processAlgorithm
Grass7Utils.executeGrass(self.commands, feedback, self.outputCommands)
File "C:/PROGRA~1/QGIS 3.4/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Utils.py", line 399, in executeGrass
startupinfo=si if isWindows() else None
File "C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "C:\PROGRA~1\QGIS 3.4\apps\Python37\lib\subprocess.py", line 1155, in _execute_child
startupinfo)
OSError: [WinError 87] The parameter is incorrect

#6 Updated by Giovanni Manghi over 5 years ago

Pedro Venâncio wrote:

Confirmed also here with a geopackage

[...]

Hi Pedro, this python error seems to be YET ANOTHER problem (see #20281)
The error about the multi layer datasources is like

ERRO:Unable to open data source </home/giovanni/Downloads/db_curso.gpkg|layername=wb1>

#7 Updated by Nyall Dawson over 5 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF