mauroalberti / qProf

Python plugin for QGIS, to create topographic and geological profiles
GNU General Public License v3.0
25 stars 3 forks source link

Remove deprecated import gdal #15

Closed PeterPetrik closed 3 years ago

PeterPetrik commented 3 years ago

QGIS on macOS uses GDAL 3.2.1 that removed the deprecated import of GDAL, please see https://pypi.org/project/GDAL/ To support macOS 3.16 LTR and macOS 3.18, please fix the code with:

try:
    from osgeo import gdal
except ImportError:
    import gdal

detto for from ogr, osr,gdal_array and gdalconst imports

details: https://github.com/qgis/QGIS-Mac-Packager/issues/114

mauroalberti commented 3 years ago

Thanks, will change for next release that however has many other changes and would require 2-3 months to be released.

mauroalberti commented 3 years ago

Submitted to QGIS plugin repository the version 0.4.4, that should fix the problem.