[QGIS-Developer] Processing parameterAsDate() problem

Luigi Pirelli luipir at gmail.com
Wed Aug 19 04:48:07 PDT 2020


https://qgis.org/api/classQgsProcessingAlgorithm.html#ae39324c4140aa810c290acdd794c5e7f

Luigi Pirelli

**************************************************************************************************
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* GitHub: https://github.com/luipir
* Book: Mastering QGIS3 - 3rd Edition
<https://www.packtpub.com/eu/application-development/mastering-geospatial-development-qgis-3x-third-edition>
* Hire a team: http://www.qcooperative.net
**************************************************************************************************


On Wed, 19 Aug 2020 at 13:28, PALMIER Patrick (Responsable de groupe) -
CEREMA/DTerNP/DATHa/MT <Patrick.Palmier at cerema.fr> wrote:

>
>
> Hello,
>
> I'm using Qgis 3.1415 46bits on Windows 10 and I try to use the new
> processing parameters controls in processing algorithms
>
> I've used a QgsProcessingParameterDateTime. It wroks well. I have access
> to the calendar form
>
>
>
> *code below:  **       self.addParameter( *
> *            QgsProcessingParameterDateTime(*
> *                self.DEBUT_PERIODE,*
> *                self.tr <http://self.tr>('Calendar start'),*
> *                type=1*
>
> *            )*
> *        )*
>
> bus when I try to get the date chosen, I"v got the following error message
>
> Traceback (most recent call last):
> File
> "C:/Users/patrick.palmier/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\networks\import_gtfs.py",
> line 175, in processAlgorithm
> debut_periode=self.parameterAsDate(parameters,self.DEBUT_PERIODE,context)
> AttributeError: 'ImportGTFS' object has no attribute 'parameterAsDate'
>
> Échec d'exécution au bout de 0.04 secondes
>
>
> code below:
>
>
> *debut_periode=self.parameterAsDate(parameters,self.DEBUT_PERIODE,context)
> *
>
>
> Do you what is wrong?
>
>
> Thanks in advance
>
> Patrick Palmier
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200819/4ab94bbb/attachment-0001.html>


More information about the QGIS-Developer mailing list