Bug report #18502

QGIS 3 Processing API does not generate fully qualified paths for output filenames

Added by Andreas Rabe almost 7 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/Modeller
Affected QGIS version:3.1(master) Regression?:No
Operating System: Easy fix?:Yes
Pull Request or Patch supplied:No Resolution:no timely feedback
Crashes QGIS or corrupts data:No Copied to github as #:26390

Description

When using relative output filenames (e.g. for output raster layers) like 'output_raster.tif', the Processing Framework will not turn it into a fully qualified path.
Depending on the ProcessingAlgorithm, the result will be written to the current working directory, e.g. C:\OSGeo4W64_Py3\bin\output_raster.tif (not so nice!), or sometimes the algorithm crashes, because it assumes a full path.

Suggestion: use the QgsApplication::qgisSettingsDirPath() as the root directory, e.g. under Windows this is:

C:\Users\janzandr\AppData\Roaming\QGIS\QGIS3\profiles\default\processing\outputs

In my opinion, if ProcessingAlgorithms can always assume a full path, it makes development much easier and consistent.

History

#1 Updated by Alexander Bruy over 6 years ago

  • Operating System deleted (Windows)
  • Status changed from Open to Feedback

Should be fixed in latest master. Please check and report back.

#2 Updated by Jürgen Fischer about 6 years ago

  • Resolution set to no timely feedback
  • Status changed from Feedback to Closed

Also available in: Atom PDF