[Qgis-developer] Error in Processing

Alexander Bruy alexander.bruy at gmail.com
Sun Feb 14 02:38:18 PST 2016


Hi Pedro,

GdalAlgorithm is an internal Processing class and should not
be used in 3rd party plugins.

The error happens because GdalAlgorithm class was refactored
and new mandatory methods were introduced. Personally I think
that all 3rd party plugins should use only public Processing API,
e.g. GeoAlgorithm class.

2016-02-14 1:44 GMT+02:00 Pedro VenĂ¢ncio <pedrongvenancio at gmail.com>:
> Hi Alexander and Victor,
>
> Actually the problem seems related with the new shortHelp function,
> introduced in commit 62302377db1990485f7821f1ccef4ff6ef4d07d9.
>
> Removing
>
>     def shortHelp(self):
>         return self._formatHelp('''This algorithm is based on the GDAL %s
> module.
>
>                 For more info, see the <a href =
> 'http://www.gdal.org/%s.html'> module help</a>
>                 ''' %  (self.commandName(), self.commandName()))
>
> from GdalAlgorithm.py prevents this error and these 3rd party plugins works
> ok.
>
> Any hint to update them?
>
> Thank you very much!
>
> Best regards,
> Pedro VenĂ¢ncio
>
>
>
> 2016-02-08 11:20 GMT+00:00 Alexander Bruy <alexander.bruy at gmail.com>:
>>
>> Hi Paolo,
>>
>> this is not a Processing issue, but bug in 3rd party plugin.
>> The bug is caused by fact that plugin uses internal Processing
>> classes (which was changed) instead of subclassing public
>> GeoAlgorithm class.
>>
>>
>> 2016-02-08 13:10 GMT+02:00 Paolo Cavallini <cavallini at faunalia.it>:
>> > Hi all,
>> > I'm getting consistent errors in activating Processing on master, see
>> > below. Anyone has the same?
>> > All the best.
>> > ===
>> > An error has occurred while executing Python code:
>> >
>> > AttributeError: RasterAT_MGIETRS89DirInv instance has no attribute
>> > 'getConsoleCommands'
>> > Traceback (most recent call last):
>> >   File
>> > "/usr/share/qgis/python/plugins/processing/gui/ProcessingToolbox.py",
>> > line 105, in textChanged
>> >     self._filterItem(self.algorithmTree.invisibleRootItem(), text)
>> >   File
>> > "/usr/share/qgis/python/plugins/processing/gui/ProcessingToolbox.py",
>> > line 127, in _filterItem
>> >     showChild = self._filterItem(child, text)
>> >   File
>> > "/usr/share/qgis/python/plugins/processing/gui/ProcessingToolbox.py",
>> > line 127, in _filterItem
>> >     showChild = self._filterItem(child, text)
>> >   File
>> > "/usr/share/qgis/python/plugins/processing/gui/ProcessingToolbox.py",
>> > line 127, in _filterItem
>> >     showChild = self._filterItem(child, text)
>> >   File
>> > "/usr/share/qgis/python/plugins/processing/gui/ProcessingToolbox.py",
>> > line 135, in _filterItem
>> >     if item.alg.shortHelp() is not None:
>> >   File
>> > "/usr/share/qgis/python/plugins/processing/algs/gdal/GdalAlgorithm.py",
>> > line 56, in shortHelp
>> >     ''' %  (self.commandName(), self.commandName()))
>> >   File
>> > "/usr/share/qgis/python/plugins/processing/algs/gdal/GdalAlgorithm.py",
>> > line 64, in commandName
>> >     name = alg.getConsoleCommands()[0]
>> > AttributeError: RasterAT_MGIETRS89DirInv instance has no attribute
>> > 'getConsoleCommands'
>> > --
>> > Paolo Cavallini - www.faunalia.eu
>> > QGIS & PostGIS courses: http://www.faunalia.eu/training.html
>> > _______________________________________________
>> > Qgis-developer mailing list
>> > Qgis-developer at lists.osgeo.org
>> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>>
>> --
>> Alexander Bruy
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>



-- 
Alexander Bruy


More information about the Qgis-developer mailing list