Error from qMRMLSegmentEditorWidgetPrivate

Windows 10 Pro
Slicer: 5.3.0–2023.07.08

Here I do call “Segment-editor” via python and always I do have this error associated with qMRMLSegmentEditorWidgetPrivate
==>
[Qt] bool __cdecl qMRMLSegmentEditorWidgetPrivate::updateSelectedSegmentLabelmap(void) : Invalid segment selection

any suggestion how to deal with this error?

Thanks a lot.

It seems that you have not selected a segment before performing some operation that expected to have a segment selected. A fix is to select the first segment of the segmentation after you set the segmentation node in the Segment Editor widget.