diff --git a/metaflow/plugins/datatools/s3/s3.py b/metaflow/plugins/datatools/s3/s3.py index aae53fb7be3..67224efc78b 100644 --- a/metaflow/plugins/datatools/s3/s3.py +++ b/metaflow/plugins/datatools/s3/s3.py @@ -495,6 +495,10 @@ class S3(object): @classmethod def get_root_from_config(cls, echo, create_on_absent=True): + if DATATOOLS_S3ROOT is None: + raise MetaflowS3URLException( + "DATATOOLS_S3ROOT is not configured when trying to use S3 storage" + ) return DATATOOLS_S3ROOT def __init__( @@ -512,6 +516,10 @@ def __init__( if run: # 1. use a (current) run ID with optional customizations + if DATATOOLS_S3ROOT is None: + raise MetaflowS3URLException( + "DATATOOLS_S3ROOT is not configured when trying to use S3 storage" + ) parsed = urlparse(DATATOOLS_S3ROOT) if not bucket: bucket = parsed.netloc