diff --git a/icepyx/core/variables.py b/icepyx/core/variables.py index fb7ea8b14..4c52003df 100644 --- a/icepyx/core/variables.py +++ b/icepyx/core/variables.py @@ -85,8 +85,14 @@ def __init__( # Set the product and version from either the input args or the file if path: self._path = val.check_s3bucket(path) - self._product = is2ref.extract_product(self._path, auth=self.auth) - self._version = is2ref.extract_version(self._path, auth=self.auth) + # Set up auth + if self._path.startswith('s3'): + auth = self.auth + else: + auth = None + # Read the product and version from the file + self._product = is2ref.extract_product(self._path, auth=auth) + self._version = is2ref.extract_version(self._path, auth=auth) elif product: # Check for valid product string self._product = is2ref._validate_product(product)