diff --git a/rl_coach/data_stores/s3_data_store.py b/rl_coach/data_stores/s3_data_store.py index 6f8ceb3..43b189a 100644 --- a/rl_coach/data_stores/s3_data_store.py +++ b/rl_coach/data_stores/s3_data_store.py @@ -18,7 +18,7 @@ from rl_coach.data_stores.data_store import DataStoreParameters from rl_coach.data_stores.checkpoint_data_store import CheckpointDataStore from minio import Minio -from minio.error import ResponseError +from minio.error import S3Error from configparser import ConfigParser, Error from rl_coach.checkpoint import CheckpointStateFile from rl_coach.data_stores.data_store import SyncFiles @@ -134,7 +134,7 @@ class S3DataStore(CheckpointDataStore): for filename in os.listdir(os.path.join(self.params.expt_dir, 'gifs')): self.mc.fput_object(self.params.bucket_name, filename, os.path.join(self.params.expt_dir, 'gifs', filename)) - except ResponseError as e: + except S3Error as e: print("Got exception: %s\n while saving to S3", e) def load_from_store(self): @@ -190,7 +190,7 @@ class S3DataStore(CheckpointDataStore): if not os.path.exists(filename): self.mc.fget_object(obj.bucket_name, obj.object_name, filename) - except ResponseError as e: + except S3Error as e: print("Got exception: %s\n while loading from S3", e) def setup_checkpoint_dir(self, crd=None):