[QGIS-Developer] Error when trying to save feature sink as file in processing plugin

Phil Ribbens philip.ribbens at gmail.com
Tue Jun 5 10:51:54 PDT 2018


Oh and I should mention that I’m using QGIS 3.0.3 on Mac 10.13.4.

> On Jun 5, 2018, at 1:45 PM, Phil Ribbens <philip.ribbens at gmail.com> wrote:
> 
> Hi,
> 
> I’m developing a processing plugin and one of the outputs of my algorithm is a table of values. I’m using a feature sink to populate that table with the values I want. When I run the algorithm and just output the table to memory (i.e. don’t specify a place to save it), it works fine. But when I try “Save to file…” it doesn’t work. I get an “Exception: unknown” error on this line of my code:
> 
> (sink, dest_id) = self.parameterAsSink(parameters, self.OUTPUT_ESV_TABLE, context, output_esv_table_fields)
> 
> I get the same error regardless of which type of file I try to save it as (csv, gpkg, shp, etc).
> 
> I get the same error regardless of whether or not I select “Open output file after running algorithm”.
> 
> If instead of providing a typical file path and name like “/Users/me/Desktop/project/whatever.csv”, I enter “memory:”, it works. 
> 
> My algorithm also outputs a raster and when I try to save that output to a file it works fine.
> 
> Any idea what the problem is?
> 
> Thanks,
> Phil Ribbens



More information about the QGIS-Developer mailing list