# Error from qMRMLSegmentEditorWidgetPrivate

**URL:** <https://discourse.slicer.org/t/error-from-qmrmlsegmenteditorwidgetprivate/30525>\
**Category:** Support\
**Tags:** segmentation, python\
**Created:** [July 11, 2023, 4:56pm UTC](https://discourse.slicer.org/t/error-from-qmrmlsegmenteditorwidgetprivate/30525 "2023-07-11T16:56:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aiden.zhu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aiden.zhu/32/67145_2.png) [@aiden.zhu](https://discourse.slicer.org/u/aiden.zhu)\
**Post date:** [July 11, 2023, 4:56pm UTC](https://discourse.slicer.org/t/error-from-qmrmlsegmenteditorwidgetprivate/30525/1 "2023-07-11T16:56:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 13, 2023, 1:22am UTC](https://discourse.slicer.org/t/error-from-qmrmlsegmenteditorwidgetprivate/30525/2 "2023-07-13T01:22:58Z")

</div>

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.
