I'm making a script that can be called by the
processing.execAlgorithmDialog function. For one of the parameters, I want to use the
QgsProcessingParameterFile class for selecting a .csv file.
I tried the following:
class T4_Visualiseer_Networks_Resultaat(QgsProcessingAlgorithm): PrmOutputFile = 'Networks result' self.addParameter( QgsProcessingParameterFile( name=self.PrmOutputFile, description="Networks resultaat", extension="csv(*.csv)" ) ) def processAlgorithm(self, parameters, context, feedback): # Some code to do after clicking ok
When I select a .csv file in a folder and press OK to begin the script, I get the message Wrong or missing parameter value: Networks resultaat (see picture below).
I already tried the following:
- Replace / by \
behavior=0to make sure a file is selected (this was already the case because the default value for behavior is 0)
- Rename the .csv file
None of the above actions fixed the problem of getting this message and I can't find any other solutions on the internet.
Do you have any idea what the problem can be or how I can fix it?