# Slicer mrml scene not loading

**URL:** <https://discourse.slicer.org/t/slicer-mrml-scene-not-loading/2090>\
**Category:** Support\
**Created:** [February 15, 2018, 11:05am UTC](https://discourse.slicer.org/t/slicer-mrml-scene-not-loading/2090 "2018-02-15T11:05:11Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![drusmanbashir](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/drusmanbashir/32/1282_2.png) [@drusmanbashir](https://discourse.slicer.org/u/drusmanbashir)\
**Post date:** [February 15, 2018, 11:05am UTC](https://discourse.slicer.org/t/slicer-mrml-scene-not-loading/2090/1 "2018-02-15T11:05:11Z")

</div>

Operating system: Windows 7  
Slicer version: 4.8.1  
Expected behavior: Stored studies should load  
Actual behavior: Nothing loads and screen remains blank

Hi,  
I save a mrml scene with 2x2 view, 1 view containing a PET volume and the rest different MRI sequences. I save all volumes as slicer .nrrd files and the scene as well through the ‘data’ option in the menubar. When i load the scene after starting a new slicer instance, it remains blank even though i can see the mrml file (even .mrb) are quite sizeable

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [February 15, 2018, 1:39pm UTC](https://discourse.slicer.org/t/slicer-mrml-scene-not-loading/2090/2 "2018-02-15T13:39:29Z")

</div>

Can you describe steps to recreate the issue using sample data?

Are there messages in the error log? (See the Report a bug in the Help menu).

---

<div class="post-metadata">

**Author:** ![drusmanbashir](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/drusmanbashir/32/1282_2.png) [@drusmanbashir](https://discourse.slicer.org/u/drusmanbashir)\
**Post date:** [February 16, 2018, 9:08pm UTC](https://discourse.slicer.org/t/slicer-mrml-scene-not-loading/2090/3 "2018-02-16T21:08:04Z")

</div>

Hi,  
The steps are very basic. I load a PET volume (DICOM) on slicer. Window it (because for some reason PET volumes always disappear afte loading and presumably after SUV calculator runs on them). Then save the mrml scene AND the PET volume(nrrd) . I have tried saving just mrml scene and same problem.  
THe message in the error log says

Error parsing XML in stream at line 36, column 71, byte index 10184: not well-formed (invalid token)

---

<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:** [February 16, 2018, 10:04pm UTC](https://discourse.slicer.org/t/slicer-mrml-scene-not-loading/2090/4 "2018-02-16T22:04:49Z")

</div>

Can you copy-paste line 36 of the scene .mrml file?

---

<div class="post-metadata">

**Author:** ![drusmanbashir](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/drusmanbashir/32/1282_2.png) [@drusmanbashir](https://discourse.slicer.org/u/drusmanbashir)\
**Post date:** [February 17, 2018, 10:04am UTC](https://discourse.slicer.org/t/slicer-mrml-scene-not-loading/2090/5 "2018-02-17T10:04:04Z")

</div>

Hi Here goes

```
   <SubjectHierarchyItem id="19" name="research^H&N_INSIGHT_CCR3926 (20140812)" parent="18" type="DICOM" expanded="true" uids="DICOM^1.2.840.113564.9.1.2728161578.69.2.5000656996|" attributes="DICOM.StudyDate^20140812|DICOM.StudyDescription^research^H&N_INSIGHT_CCR3926|DICOM.StudyTime^103856.078000|Level^Study|StudyID^RPY0130070512302|StudyInstanceUID^1.2.840.113564.9.1.2728161578.69.2.5000656996|">
```

---

<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:** [February 17, 2018, 2:48pm UTC](https://discourse.slicer.org/t/slicer-mrml-scene-not-loading/2090/6 "2018-02-17T14:48:17Z")

</div>

The error is due to having special character (&) in the patient name. We’ll fix this soon, but until then you have to manually remove special characters from the patient name in Data module.

---

<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:** [February 17, 2018, 4:38pm UTC](https://discourse.slicer.org/t/slicer-mrml-scene-not-loading/2090/7 "2018-02-17T16:38:43Z")

</div>

@cpinter Could you have a look and if you can encode/decode subject hierarchy strings when written to XML, using these new methods?

[http://apidocs.slicer.org/master/classvtkMRMLNode.html#a565950b5bc18bb237cc4b2b3cd92a248](http://apidocs.slicer.org/master/classvtkMRMLNode.html#a565950b5bc18bb237cc4b2b3cd92a248)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [February 20, 2018, 3:45pm UTC](https://discourse.slicer.org/t/slicer-mrml-scene-not-loading/2090/8 "2018-02-20T15:45:43Z")

</div>

Yes I’ll do that soon.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [February 23, 2018, 8:52pm UTC](https://discourse.slicer.org/t/slicer-mrml-scene-not-loading/2090/9 "2018-02-23T20:52:45Z")

</div>

Fixed in [https://github.com/Slicer/Slicer/commit/1248aef7a85cf430cd8bf9681366001875675d63](https://github.com/Slicer/Slicer/commit/1248aef7a85cf430cd8bf9681366001875675d63)

This will be available in tomorrow’s preview release.

---

<div class="post-metadata">

**Author:** ![drusmanbashir](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/drusmanbashir/32/1282_2.png) [@drusmanbashir](https://discourse.slicer.org/u/drusmanbashir)\
**Post date:** [March 6, 2018, 2:22pm UTC](https://discourse.slicer.org/t/slicer-mrml-scene-not-loading/2090/10 "2018-03-06T14:22:41Z")

</div>

Hi, The issue remains as of nightly build 2018-03-04:

Error log:  
Error parsing XML in stream at line 36, column 71, byte index 9456: not well-formed (invalid token)

Line 36 of mrml scene (without starting ‘\<’ ):  
SubjectHierarchyItem id=“24” name=“Research^CCR3926\_H&N\_INSIGHT (20160113)” parent=“23” type=“DICOM” expanded=“true” uids=“DICOM^1.2.840.113564.9.1.2843759204.47.2.5000942147|” attributes=“DICOM.StudyDate^20160113|DICOM.StudyDescription^Research^CCR3926\_H&N\_INSIGHT|DICOM.StudyTime^094327.220000|Level^Study|StudyID^RPY0130094269703|StudyInstanceUID^1.2.840.113564.9.1.2843759204.47.2.5000942147|”

---

<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:** [March 6, 2018, 2:44pm UTC](https://discourse.slicer.org/t/slicer-mrml-scene-not-loading/2090/11 "2018-03-06T14:44:08Z")

</div>

Thanks for reporting this. I’ve checked this and the problem is that somehow we missed encoding the node names as well. I’ll add this now so it should work in tomorrow’s build.
