[QGIS-Developer] Processing parameterAsDate() problem

PALMIER Patrick (Responsable de groupe) - CEREMA/DTerNP/DATHa/MT Patrick.Palmier at cerema.fr
Wed Aug 19 04:28:27 PDT 2020



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('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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200819/fe6019d5/attachment.html>


More information about the QGIS-Developer mailing list