Errors when saving vtkMRMLTextNode to scene

I was following the suggestion from here to use a vtkMRMLTextNode when the amount of text to store is a bit large or complex for a ParameterNode. However, I now get errors when trying to save the scene. Specifically, I get red “X” icons next to any text node I try to save, and the following error in the log:

No writer found to write file QVariant(QString, "C:/Users/mikeb/Documents/Neuro/TEMP/Testing/Slicer/RSO_TextNode.txt") of type "MyFileType"

No .txt files are saved and when I load the scene the text nodes are empty.
Also, in the Save dialog, the text nodes always show “Not Modified” in the status regardless of whether they have been modified or not (and since they’ve never actually been successfully saved, they should probably all show as “Modified” until a successful save).

I have tried fiddling a bit with the SetForceCreateStorageNode() function and tried CreateDefaultStorageNode(), but neither seemed to affect the saving bug.

This false alarm is caused by a testing script. I’ll submit a fix soon.

1 Like

Thanks! Is there a workaround until then?

Fixed - https://github.com/Slicer/Slicer/commit/23171356da12fb67ed3232822a524d2f6abf9f37. As a workaround, you can delete SlicerScriptedFileReaderWriterTest.py.

1 Like