Skip to content

Commit f7b1444

Browse files
committed
update to remove the check on if it is a list
1 parent cfec417 commit f7b1444

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

labelbox/schema/dataset.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import ndjson
1010
from io import StringIO
1111
import requests
12+
from collections.abc import Iterable
1213

1314
from labelbox.exceptions import InvalidQueryError, LabelboxError, ResourceNotFoundError, InvalidAttributeError
1415
from labelbox.orm.db_object import DbObject, Updateable, Deletable
@@ -298,6 +299,11 @@ def convert_item(item):
298299
for key, value in item.items()
299300
}
300301

302+
if not isinstance(items, Iterable):
303+
raise ValueError(
304+
f"Must pass an iterable to create_data_rows. Found {type(items)}"
305+
)
306+
301307
with ThreadPoolExecutor(file_upload_thread_count) as executor:
302308
futures = [executor.submit(convert_item, item) for item in items]
303309
items = [future.result() for future in as_completed(futures)]

0 commit comments

Comments
 (0)