[QGIS-Developer] Error when saving Processing Script QGIS master

Nyall Dawson nyall.dawson at gmail.com
Fri Mar 23 17:15:49 PDT 2018


On 23 March 2018 at 17:39, matteo <matteo.ghetta at gmail.com> wrote:
> Hi all,
>
> I really don't know if I'm missing something basic, but even with this
> super short script (that does not run anything):
>
>
> from processing.algs.qgis.QgisAlgorithm import QgisAlgorithm
>
>
> class myScript(QgisAlgorithm):

Does it help if you inherit from QgsProcessingAlgorithm instead?
There's no need to inherit from QgisAlgorithm here, you should use the
base class directly.

Nyall

>
>     INPUT = 'INPUT'
>     OUTPUT = 'OUTPUT'
>
>
>     def group(self):
>         return 'My group'
>
>     def name(self):
>         return 'my algorithm'
>
>
> from the editor I can run it (and the dialog pops up normally, even
> without parameters), I can save it, but when I close it than the same
> error appears:
>
> NotImplementedError: QgsProcessingAlgorithm.name() is abstract and must
> be overridden
>
>
> Cheers and thanks for any hint
>
> Matteo
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the QGIS-Developer mailing list