Deltares / imod-qgis

🗺️🧭 QGIS plugin for iMOD
GNU General Public License v2.0
7 stars 1 forks source link

Open IDF fails with a cryptic error if an IDF is opened in a sector without user permissions #67

Open Huite opened 6 months ago

Huite commented 6 months ago

The GDAL driver fails silently in creating a tif when the user has no permission.

The resulting error is that None type has no attribute setGeoTransform: https://github.com/Deltares/imod-qgis/blob/148057842c41285f01ab3b09162a388f9b0821e8/imodqgis/idf/conversion.py#L40

This is a typical problem since GDAL does not return error codes or anything. We should check whether the TIF has been succesfully made, and if not, raise a QGIS error. This error should clearly state that the TIF could not be made, and that permissions are required as a hint.