# Export segment to labelmap broken in May 25 nightly

**URL:** <https://discourse.slicer.org/t/export-segment-to-labelmap-broken-in-may-25-nightly/11736>\
**Category:** Development\
**Created:** [May 27, 2020, 4:18pm UTC](https://discourse.slicer.org/t/export-segment-to-labelmap-broken-in-may-25-nightly/11736 "2020-05-27T16:18:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [May 27, 2020, 4:18pm UTC](https://discourse.slicer.org/t/export-segment-to-labelmap-broken-in-may-25-nightly/11736/1 "2020-05-27T16:18:22Z")

</div>

In the last few days, exporting a segment to a labelmap stopped working. Works fine in May 21 nightly, doesn’t work in May 25 nightly (latest build, downloaded for Mac this morning).

I have a debug build, I’m happy to help troubleshoot.

Thanks!

Errors from the log:

virtual double qSlicerSubjectHierarchyFolderPlugin::canOwnSubjectHierarchyItem(vtkIdType) const : Input item is invalid

GetItemDataNode: Failed to find subject hierarchy item by ID 0

ExportSegmentsToLabelmapNode: Failed to generate shared labelmap

bool qSlicerSegmentationsModuleWidget::exportFromCurrentSegmentation() : “Failed to export segments from segmentation Segmentation to labelmap node Segmentation-Air spaces-label!\n\nMost probably the segment cannot be converted into binary labelmap representation.”

---

<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:** [May 27, 2020, 6:17pm UTC](https://discourse.slicer.org/t/export-segment-to-labelmap-broken-in-may-25-nightly/11736/2 "2020-05-27T18:17:56Z")

</div>

I was able to reproduce the error. I’ll get back to you soon.

---

<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:** [May 27, 2020, 6:47pm UTC](https://discourse.slicer.org/t/export-segment-to-labelmap-broken-in-may-25-nightly/11736/3 "2020-05-27T18:47:24Z")

</div>

I’ve found the problem, this is a regression due to additional error checks that we introduced a few days ago (the error is caught by the test dashboard, too, but since it was such a small change, I did not check). The problem is fixed now. Thanks for reporting!

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [May 27, 2020, 8:29pm UTC](https://discourse.slicer.org/t/export-segment-to-labelmap-broken-in-may-25-nightly/11736/4 "2020-05-27T20:29:45Z")

</div>

Awesome! Thanks!

-Hollister
