From b720895307a940d9b2d046a3e45fca081fe9b232 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Fri, 27 Sep 2019 13:21:04 +0300 Subject: [PATCH] Fix S3 warning --- trains/storage/helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trains/storage/helper.py b/trains/storage/helper.py index 5881f071..e540b0ec 100644 --- a/trains/storage/helper.py +++ b/trains/storage/helper.py @@ -688,7 +688,7 @@ class StorageHelper(object): if dest_path.startswith('http'): return True try: - self.upload_from_stream(stream=iter(b'trains'), dest_path=dest_path) + self.upload_from_stream(stream=six.BytesIO(b'trains'), dest_path=dest_path) self.delete(path=dest_path) except Exception: raise ValueError('Insufficient permissions for {}'.format(base_url)) @@ -861,7 +861,7 @@ class StorageHelper(object): except ConnectionError as ex: raise DownloadError except Exception as e: - self.log.exception('Storage helper problem for {}'.format(str(object_name))) + self.log.warning('Storage helper problem for {}: {}'.format(str(object_name), str(e))) return None