Bug report #18264

Processing/GDAL: "Convert format" does not work anymore in batch mode

Added by Simon Falceri over 2 years ago. Updated over 1 year ago.

Status:Closed
Priority:High
Assignee:Victor Olaya
Category:Processing/GDAL
Affected QGIS version:3.0.0 Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:no timely feedback
Crashes QGIS or corrupts data:No Copied to github as #:26155

Description

When I try to convert some Postgis filtered layers with attributes to KML as Batch process,
it terminate without output files.

Associated revisions

Revision bd65fc60
Added by Nyall Dawson about 2 years ago

[processing][gdal] Don't double quote output paths

Breaks for some drivers, e.g. KML

Fixes #18264

History

#1 Updated by Giovanni Manghi over 2 years ago

  • Priority changed from Normal to High
  • Regression? changed from No to Yes

#2 Updated by Nyall Dawson over 2 years ago

  • Status changed from Open to Feedback

Which algorithm are you using? Does it work in non-batch mode?

#3 Updated by Simon Falceri over 2 years ago

QGIS-3
Algorithm ID: 'gdal:convertformat'

normal_mode:
1 Postgis layer input, 1 KML layer output as file.
ERROR 1: ERROR Creating dir: "C:/temp/MUFFOLE.kml" for KML datasource
ERROR 1: LIBKML driver failed to create "C:/temp/MUFFOLE.kml"
It work only in a temporary layer, but not work in a saved layer.

batch_mode:
some Postgis layers input, some KML layers output.
FAILURE:
Unable to open datasource... (my correct database)

This algorithm not work!
In normal mode and batch process mode, nothing to do to save to a specific file.
I have tested Postgis layers to KML, SHP, CSV ... nothing to do!

QGIS-2
ogr:convertformat

normal_mode:
work only in a temporary layer, but not work in a saved layer.

PS: in both versions of Qgis, the convertformat algorithm, work only in a normal-mode with temporary layer.

#4 Updated by Nyall Dawson over 2 years ago

Can you post the log window messages from running in 3.0?

#5 Updated by Simon Falceri over 2 years ago

LOG PANEL PROCESSING

2018-03-06T15:03:58 INFO ogr2ogr -f "LIBKML" "\"C:/temp/TEST BUG QGIS/Points.kml\"" C:/Users/me/AppData/Local/Temp/processing_c6a27546734942bfb6735bb70709d0ea/c28a4520e8a34da7b1c80dd6d6527683/INPUT.shp INPUT
2018-03-06T15:03:59 INFO GDAL execution console output

ERROR 1: ERROR Creating dir: "C:/temp/TEST BUG QGIS/Points.kml" for KML datasource
ERROR 1: LIBKML driver failed to create "C:/temp/TEST BUG QGIS/Points.kml"

#6 Updated by Giovanni Manghi over 2 years ago

  • Operating System deleted (Win7 x64 SP1)
  • Subject changed from Processing - Convert formats not work to Processing/GDAL: "Convert format" does not work anymore in batch mode
  • Status changed from Feedback to Open

Confirm it does not work anymore in batch mode.

#7 Updated by Nyall Dawson about 2 years ago

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

#8 Updated by Simon Falceri about 2 years ago

  • Status changed from Closed to Reopened

I tried with Qgis3.2.0 the same operation of massive conversion of layers, but without success.
Can you try to "convert format" layers in "run as batch Process" mode? It does not work.

#9 Updated by Nyall Dawson about 2 years ago

  • Status changed from Reopened to Feedback

Please post the contents of the processing dialog log tab

#10 Updated by Simon Falceri about 2 years ago

Processing algorithm 1/16…
Algorithm Convert formats starting…
Input parameters: {'INPUT': '1 - My_Points',
'OPTIONS': '',
'OUTPUT': <QgsProcessingOutputLayerDefinition {'sink':C:/temp/_test/_1 - My_Points.gpkg, 'createOptions': {}}>}

GDAL command:
ogr2ogr -f "GPKG" "C:/temp/_test/_1 - My_Points.gpkg" "bname='tnnet' host=abcdefghilmno.it port=5432 user='webgis_user1' password='' sslmode=disable key='site_id' srid=3064 type=Point checkPrimaryKeyUnicity='1' table=\"view\".\"v_sumps\" (geo) sql=\"My_Points_counts\" > " view.v_sumps
GDAL command output:
FAILURE:

Unable to open datasource `bname='tnnet' host=abcdefghilmno.it port=5432 user='webgis_user1' password='' sslmode=disable key='site_id' srid=3064 type=Point checkPrimaryKeyUnicity='1' table="view"."v_sumps" (geo) sql="My_Points_counts" > ' with the following drivers.

-> `JP2ECW'

-> `OCI'

-> `SOSI'

-> `PCIDSK'

-> `netCDF'

-> `JP2OpenJPEG'

-> `PDF'

-> `DB2ODBC'

-> `ESRI Shapefile'

-> `MapInfo File'

-> `UK .NTF'

-> `OGR_SDTS'

-> `S57'

-> `DGN'

-> `OGR_VRT'

-> `REC'

-> `Memory'

-> `BNA'

-> `CSV'

-> `NAS'

-> `GML'

-> `GPX'

-> `LIBKML'

-> `KML'

-> `GeoJSON'

-> `Interlis 1'

-> `Interlis 2'

-> `OGR_GMT'

-> `GPKG'

-> `SQLite'

-> `ODBC'

-> `WAsP'

-> `PGeo'

-> `MSSQLSpatial'

-> `OGR_OGDI'

-> `PostgreSQL'

-> `MySQL'

-> `OpenFileGDB'

-> `XPlane'

-> `DXF'

-> `CAD'

-> `Geoconcept'

-> `GeoRSS'

-> `GPSTrackMaker'

-> `VFK'

-> `PGDUMP'

-> `OSM'

-> `GPSBabel'

-> `SUA'

-> `OpenAir'

-> `OGR_PDS'

-> `WFS'

-> `HTF'

-> `AeronavFAA'

-> `Geomedia'

-> `EDIGEO'

-> `GFT'

-> `SVG'

-> `CouchDB'

-> `Cloudant'

-> `Idrisi'

-> `ARCGEN'

-> `SEGUKOOA'

-> `SEGY'

-> `XLS'

-> `ODS'

-> `XLSX'

-> `ElasticSearch'

-> `Walk'

-> `Carto'

-> `AmigoCloud'

-> `SXF'

-> `Selafin'

-> `JML'

-> `PLSCENES'

-> `CSW'

-> `VDV'

-> `GMLAS'

-> `TIGER'

-> `AVCBin'

-> `AVCE00'

-> `HTTP'

Algorithm Converti formati correctly executed…
Execution completed in 0.56 seconds
Results: {'OUTPUT': <QgsProcessingOutputLayerDefinition {'sink':C:/temp/_test/_1 - My_Points.gpkg, 'createOptions': {}}>}

Loading layer
The following layers have not been loaded correctly<ul><li>C:/temp/_test/_1 - My_Points.gpkg</li></ul>You can check the "Message Panel" in the main QGIS window to find out more about the algorithm's execution

#11 Updated by Jürgen Fischer over 1 year ago

  • Status changed from Feedback to Open
  • Priority changed from High to Normal

#12 Updated by Giovanni Manghi over 1 year ago

  • Priority changed from Normal to High
  • Status changed from Open to Feedback

Please try again with 3.4.1

#13 Updated by Nyall Dawson over 1 year ago

  • Status changed from Feedback to Closed
  • Resolution set to no timely feedback

*

Also available in: Atom PDF