Skip to content

Commit e026eef

Browse files
committed
fix
1 parent d856950 commit e026eef

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

luxonis_ml/data/parsers/luxonis_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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(

luxonis_ml/utils/filesystem.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff 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":

0 commit comments

Comments
 (0)