As you are using QGIS 3.14, I would suggest you to use qgis_process if you
can.
Do you really want to use PyQGIS?

But if you really need PyQGIS, maybe the path where your script is located
is not known to your standalone script ?

Le lun. 2 nov. 2020 à 17:33, PALMIER Patrick (Responsable de groupe) -
CEREMA/DTerNP/DATHa/MT <[email protected]> a écrit :

> Hello,
>
> I work with Qgis 3.14 in Windows 10
>
> I try to call a processing algorithm from a python stand alone app,
> I want to run the following script from the custom Networks algorithm
> provider but I have the message that the algorithm is not known
>
> How to register the provider in the processing registry to be able to call
> it?
>
>
>     QgsApplication.setPrefixPath("C:/Program Files/QGIS 3.14/apps/qgis",
> True)
>     qgs = QgsApplication([], False)
>
>     qgs.initQgis()
>     import processing
>     from processing.core.Processing import Processing
>     Processing.initialize()
>
>
>
>     processing.run("Networks:musliw_simple_matrix",
> {'NODES':'G:/BD_DREAL/2020/script_modele_resmultimodal_light
> /noeuds_light_hdf_be.gpkg','NUM':'num','START_POINT':'708675.425564,7063676.157556
> [EPSG:2154]','END_POINT':'708675.425564,7063676.157556
> [EPSG:2154]','DEMAND':1,'DAY':1,'TIME':'09:00:00','DEPARTURE':1,'OUTPUT':'G:/BD_DREAL/2020/script_modele_resmultimodal_light/matrice.txt','WRITE_MODE':0})
>
> Thanks
>
> Best regards
>
>
> --
>
> * Patrick Palmier *
>
> * Responsable du groupe Mobilités et Territoires DATHa / MT *
> * Tél.: +33(0)3 20 49 60 70- Port : +33(0)7 77 34 25 07 *
>
> Cerema Nord-Picardie / 44 ter rue Jean-Bart - CS20275 - 59019 LILLE cedex
>
> _______________________________________________
> QGIS-Developer mailing list
> [email protected]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to