Closed dm413 closed 1 year ago
Thanks for reporting @dm413,
it is not really a bug, but a change in QGIS v3.30. The 5th argument of parameterAsSink now has to be a QgsWkbType: https://qgis.org/pyqgis/3.30/core/QgsProcessingAlgorithm.html#qgis.core.QgsProcessingAlgorithm.parameterAsSink. In earlier versions it could also be an integer.
I changed this line from
(sink, dest_id) = self.parameterAsSink(parameters, self.OUTPUT, context,
output_layer_fields, 2,
source_layer.sourceCrs())
to
(sink, dest_id) = self.parameterAsSink(parameters, self.OUTPUT, context,
output_layer_fields, QgsWkbTypes.LineString,
source_layer.sourceCrs())
You can either do the same or re-download the algorithm or entire plugin from this master: https://github.com/mkoenigb/ProcessX/archive/refs/heads/main.zip. Alternatively you could also use an older version than 3.30, such as 3.16.
This works. Thank you!
I am trying to use your Nearest Points to Path algorithm to convert points to a line. But I get an "unexpected type" error.
I select some points in a points layer, then run the tool. Turn on the selected points checkmark, set order-by to $X, and leave the rest of the settings as default. I have tried variations of this, including not changing any settings, and using all points in the layer, and get the same error.
The native point-to-path algorithm works fine with my data.
Am I doing something wrong, or is this a bug?
Full output is below. QGIS 3.30.1 on Windows 10.
Thanks,