Skip to content

Commit

Permalink
Update error message for setting Labels.sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
roomrys committed Sep 29, 2023
1 parent 48787cd commit 6f564f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sleap/io/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,8 @@ def sessions(self) -> List[RecordingSession]:
def sessions(self, value: RecordingSession):
"""Set the sessions in the labels."""
raise ValueError(
"Setting sessions should be done through `Labels.add_session`."
"Direct assignment to `Labels.sessions` is not allowed. "
"Please use `Labels.add_session` to add a session."
)

def __len__(self) -> int:
Expand Down

0 comments on commit 6f564f7

Please sign in to comment.