From e11b42df6f485ea11ab90c59939f3a5e9be6a842 Mon Sep 17 00:00:00 2001
From: leufen1 <l.leufen@fz-juelich.de>
Date: Wed, 13 Jul 2022 17:48:41 +0200
Subject: [PATCH] adjust reqs and implement workaround for issue with logging
 during del

---
 mlair/run_modules/run_environment.py | 7 +++++--
 requirements.txt                     | 4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/mlair/run_modules/run_environment.py b/mlair/run_modules/run_environment.py
index df34345b..2d42b186 100644
--- a/mlair/run_modules/run_environment.py
+++ b/mlair/run_modules/run_environment.py
@@ -115,7 +115,10 @@ class RunEnvironment(object):
         """
         if not self.del_by_exit:
             self.time.stop()
-            logging.info(f"{self._name} finished after {self.time}")
+            try:
+                logging.info(f"{self._name} finished after {self.time}")
+            except NameError:
+                pass
             self.del_by_exit = True
             # copy log file and clear data store only if called as base class and not as super class
             if self.__class__.__name__ == "RunEnvironment":
@@ -123,7 +126,7 @@ class RunEnvironment(object):
                     self.__plot_tracking()
                     self.__save_tracking()
                     self.__move_log_file()
-                except FileNotFoundError:
+                except (FileNotFoundError, NameError):
                     pass
                 self.data_store.clear_data_store()
 
diff --git a/requirements.txt b/requirements.txt
index 6bb524a0..5e36bef3 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -10,7 +10,7 @@ locket==0.2.1
 matplotlib==3.4.3
 mock==4.0.3
 netcdf4==1.6.0
-numpy==1.21.3
+numpy~=1.19.2
 pandas==1.3.4
 partd==1.2.0
 psutil==5.9.1
@@ -30,6 +30,6 @@ tabulate==0.8.10
 tensorflow==2.6.0
 timezonefinder==5.2.0
 toolz==0.11.1
-typing_extensions==3.10.0.0
+typing_extensions~=3.7.4
 wget==3.2
 xarray==0.16.2
-- 
GitLab