[QGIS-Developer] Skip loading plugin if errors

matteo matteo.ghetta at gmail.com
Wed Dec 28 05:15:03 PST 2022


Hola Germàn,

thanks for the suggestion! I'll try and let you know

Cheers

Matteo

On 12/28/22 10:40, Germán Carrillo wrote:
> Hi Matteo,
> 
> I've added a few validations for this plugin to gently inform users of 
> missing dependencies:
> 
> https://github.com/SwissTierrasColombia/Asistente-LADM-COL/blob/master/asistente_ladm_col/__init__.py <https://github.com/SwissTierrasColombia/Asistente-LADM-COL/blob/master/asistente_ladm_col/__init__.py>
> 
> Hope that helps.
> 
> Regards,
> 
> Germán
> 
> 
> El mié, 28 dic 2022 a las 9:58, matteo via QGIS-Developer 
> (<qgis-developer at lists.osgeo.org 
> <mailto:qgis-developer at lists.osgeo.org>>) escribió:
> 
>     Hi devs,
> 
>     I'm developing a Processing provider plugin that needs some external
>     python packages. If these are not installed on the system, when
>     starting
>     QGIS and loading the plugin the error message pops up (of course).
> 
>     Is there a way to have a "more friendly" message without opening the
>     Stacktrace? For example creating a messagebox/bar with the message
>     "Install the package...... else you cannot use the plugin"
> 
>     I've added a simple try/except in the plugin classFactory method but
>     I'm
>     still stuck in the loop somewhere.
> 
>     Thanks for any suggestion
> 
>     Cheers
> 
>     Matteo
> 
>     _______________________________________________
>     QGIS-Developer mailing list
>     QGIS-Developer at lists.osgeo.org <mailto:QGIS-Developer at lists.osgeo.org>
>     List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>     <https://lists.osgeo.org/mailman/listinfo/qgis-developer>
>     Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>     <https://lists.osgeo.org/mailman/listinfo/qgis-developer>
> 
> 
> -- 
> -----------
>     |\__
> (:>__)(
>     |/
> Soluciones Geoinformáticas Libres
> http://geotux.tuxfamily.org/ <http://geotux.tuxfamily.org/>
> https://twitter.com/GeoTux2 <http://twitter.com/GeoTux2>
> 
> <http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo>


More information about the QGIS-Developer mailing list