Commit 0ee463de authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Catch UserWarning when importing pyresample.


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 85c4e089
......@@ -41,11 +41,15 @@ from py_tools_ds.geo.coord_grid import find_nearest
from py_tools_ds.io.raster.writer import write_numpy_to_image
from py_tools_ds.processing.shell import subcall_with_output
# NOTE: In case of ImportError: dlopen: cannot load any more object with static TLS,
# one could add 'from pykdtree.kdtree import KDTree' here (before pyresample import)
from pyresample.geometry import AreaDefinition, SwathDefinition, create_area_def
from pyresample.bilinear import resample_bilinear
from pyresample.kd_tree import resample_nearest, resample_gauss, resample_custom
with warnings.catch_warnings():
# work around https://github.com/pytroll/pyresample/issues/375
warnings.simplefilter('ignore', UserWarning)
# NOTE: In case of ImportError: dlopen: cannot load any more object with static TLS,
# one could add 'from pykdtree.kdtree import KDTree' here (before pyresample import)
from pyresample.geometry import AreaDefinition, SwathDefinition, create_area_def
from pyresample.bilinear import resample_bilinear
from pyresample.kd_tree import resample_nearest, resample_gauss, resample_custom
from .version import __version__ as _libver
......
......@@ -30,12 +30,18 @@ from typing import Union, Tuple
import multiprocessing
from concurrent.futures import TimeoutError as Timeout
from warnings import warn
import warnings
import platform
from pebble import ProcessPool, ProcessExpired
import numpy as np
from pyproj import CRS
from pyresample import AreaDefinition
with warnings.catch_warnings():
# work around https://github.com/pytroll/pyresample/issues/375
warnings.simplefilter('ignore', UserWarning)
from pyresample import AreaDefinition
from py_tools_ds.geo.coord_trafo import transform_any_prj
from .transformer_2d import \
......
Supports Markdown
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