Skip to content

Commit 84f77c8

Browse files
committed
chore: remove path check
1 parent 700eee0 commit 84f77c8

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

examples/upload_datasets.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Example to import datasets into Cytomine."""
22

33
import logging
4-
import os
54
import sys
65
from argparse import ArgumentParser
76

@@ -31,7 +30,8 @@
3130
)
3231
parser.add_argument(
3332
"--path",
34-
help="The path to the datasets to import",
33+
default="/dataset",
34+
help="The path specified in DATASET_PATH environment variable",
3535
)
3636
params, _ = parser.parse_known_args(sys.argv[1:])
3737

@@ -40,11 +40,6 @@
4040
public_key=params.public_key,
4141
private_key=params.private_key,
4242
) as cytomine:
43-
44-
# Check that the datasets path exists on your file system
45-
if not os.path.exists(params.path):
46-
raise ValueError(f"{params.path} does not exist!")
47-
4843
# To import the datasets, we need to know the ID of your Cytomine storage.
4944
storages = StorageCollection().fetch()
5045
storage = next(

0 commit comments

Comments
 (0)