diff --git a/mlair/run_modules/run_environment.py b/mlair/run_modules/run_environment.py index df34345b4fb67e764f6e4d8d6570a5fafb762304..2d42b1868736a3684ffe7b507e3e83f3d8d8b3da 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 6bb524a0ee1ebff05d82d8bacf5238c7152ef385..5e36bef33d21b0bf04a1207d942c0c219661b1ca 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