File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -285,7 +285,7 @@ def _download_roboflow_dataset(
285285 "Please set it to your Roboflow API key."
286286 )
287287
288- rf = Roboflow (api_key = environ .ROBOFLOW_API_KEY )
288+ rf = Roboflow (api_key = environ .ROBOFLOW_API_KEY . get_secret_value () )
289289 parts = dataset_dir .split ("roboflow://" )[1 ].split ("/" )
290290 if len (parts ) != 4 :
291291 raise ValueError (
Original file line number Diff line number Diff line change @@ -152,8 +152,12 @@ def init_fsspec_filesystem(self) -> fsspec.AbstractFileSystem:
152152 # NOTE: In theory boto3 should look in environment variables automatically but it doesn't seem to work
153153 fs = fsspec .filesystem (
154154 self .protocol ,
155- key = environ .AWS_ACCESS_KEY_ID ,
156- secret = environ .AWS_SECRET_ACCESS_KEY ,
155+ key = environ .AWS_ACCESS_KEY_ID .get_secret_value ()
156+ if environ .AWS_ACCESS_KEY_ID is not None
157+ else None ,
158+ secret = environ .AWS_SECRET_ACCESS_KEY .get_secret_value ()
159+ if environ .AWS_SECRET_ACCESS_KEY is not None
160+ else None ,
157161 endpoint_url = environ .AWS_S3_ENDPOINT_URL ,
158162 )
159163 elif self .protocol == "gcs" :
You can’t perform that action at this time.
0 commit comments