Bug report #16114
Poor error handling when passing "simplify geometries" default output file
|Affected QGIS version:||2.18.2||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||24026|
"Simplify geometries" fails with an unhelpful error message when no filename is specified for the output parameter. The dialog box has a default value of [Create temporary layer] in the output parameter, as shown in simple_geo1.jpg. I read this to mean that qgis will create a temporary layer if I don't enter a filename. Upon clicking Run the error message in simple_geo_error_msg.jpg is shown. Checking the log as suggested shows a python dump as shown in simple_geo_py_dump.jpg. If a filename is typed in the tool works great.
If the tool is supposed to create a temporary layer as I'm assuming, something is clearly broken. If the tool requires an output file, there should be a better error message. I also tested "densify geometries" and it had the same issue.
Tested on Windows 7 with 2.18.2 (64 bit)
#4 Updated by Mike Bannister over 5 years ago
- File qgis_test_data.zip added
Two sample datasets are attached: test_works and test_doesnt_work.
When running "simplify geometries" and not using an output filename on test_works (i.e., leaving the default of [Create temporary layer]) everything works and a temporary layer is created. This dataset was digitized in qgis.
Performing the same process on test_doesnt_work throws an error message. If a filename is typed into the output filename field in the dialog box instead of using the default everything works. This layer was initially converted from GPX to shp using qgis, and then processed using fiona (python shapefile package).
I initially discovered this issue simplifying contours that had been clipped in arcgis (original source unknown). I tested the above process using various datasets that had been created in arc. Some worked, some didn't. I'm not sure why.