We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4815d3 commit 99f9a43Copy full SHA for 99f9a43
2 files changed
nucleus/dataset.py
@@ -221,9 +221,9 @@ def create_slice(
221
222
:return: new Slice object
223
"""
224
- if dataset_item_ids and reference_ids:
+ if bool(dataset_item_ids) == bool(reference_ids):
225
raise Exception(
226
- "You cannot specify both dataset_item_ids and reference_ids"
+ "You must specify exactly one of dataset_item_ids or reference_ids."
227
)
228
payload: Dict[str, Any] = {NAME_KEY: name}
229
if dataset_item_ids:
nucleus/utils.py
@@ -77,7 +77,7 @@ def serialize_and_write(
77
):
78
for unit in upload_unit:
79
try:
80
- file_pointer.write(unit.to_json())
+ file_pointer.write(unit.to_json() + "\n")
81
except TypeError as e:
82
type_name = type(unit).__name__
83
message = (
0 commit comments