Commit 73bc9f3e authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Replaced deprecated gdal imports to fix "DeprecationWarning: gdal.py was...


Replaced deprecated gdal imports to fix "DeprecationWarning: gdal.py was placed in a namespace, it is now available as osgeo.gdal".
Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent ae847a01
...@@ -8,6 +8,8 @@ History ...@@ -8,6 +8,8 @@ History
New features: New features:
* 'make lint' now directly prints errors instead of only logging them to logfiles. * 'make lint' now directly prints errors instead of only logging them to logfiles.
* Replaced deprecated gdal imports to fix
"DeprecationWarning: gdal.py was placed in a namespace, it is now available as osgeo.gdal".
Bugfixes: Bugfixes:
* Pinned gdal to version<=3.1.2 to avoid import error. * Pinned gdal to version<=3.1.2 to avoid import error.
......
import os import os
from os.path import dirname, isfile, splitext, join from os.path import dirname, isfile, splitext, join
import numpy as np import numpy as np
import gdal from osgeo import gdal
from gdalconst import GA_ReadOnly from gdalconst import GA_ReadOnly
import logging import logging
import inspect import inspect
......
...@@ -12,7 +12,7 @@ from time import time ...@@ -12,7 +12,7 @@ from time import time
from uuid import uuid1 from uuid import uuid1
from xml.etree.ElementTree import QName from xml.etree.ElementTree import QName
import xml.etree.ElementTree import xml.etree.ElementTree
import gdal from osgeo import gdal
import glymur import glymur
import iso8601 import iso8601
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
......
...@@ -11,7 +11,7 @@ from time import sleep, time ...@@ -11,7 +11,7 @@ from time import sleep, time
from types import MethodType from types import MethodType
from types import SimpleNamespace from types import SimpleNamespace
from xml.dom.minidom import parseString from xml.dom.minidom import parseString
import gdal from osgeo import gdal
import mpld3 import mpld3
import PIL import PIL
import numpy as np import numpy as np
......
...@@ -35,7 +35,7 @@ from numbers import Number ...@@ -35,7 +35,7 @@ from numbers import Number
import matplotlib import matplotlib
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
import gdal from osgeo import gdal
from .AC.RtFo import Rho2Rj_const, Rj2RhoJ_const, RtFo from .AC.RtFo import Rho2Rj_const, Rj2RhoJ_const, RtFo
from .AC.ACG import instrument_subset from .AC.ACG import instrument_subset
......
...@@ -27,7 +27,7 @@ import matplotlib.pyplot as plt ...@@ -27,7 +27,7 @@ import matplotlib.pyplot as plt
import h5py import h5py
from datetime import datetime from datetime import datetime
import subprocess import subprocess
import gdal from osgeo import gdal
from sicor import tables from sicor import tables
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment