XML Import Problem with Articy:Draft - 'ConditionNode' is not a valid value

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
twobytwogames
Posts: 6
Joined: Tue Jan 22, 2019 5:20 pm

XML Import Problem with Articy:Draft - 'ConditionNode' is not a valid value

Post by twobytwogames »

Hey there - been using the Articy:Draft import feature for a while now, and up until today everything's been working great!

I've been adding a LOT more branching and conditional states into my game for the past month or so without importing it into Unity. In a previous export from February, there were no problems with importing into Unity, but my latest XML export from A:D gives the following error (I tried exporting this as a text file and attaching it, but it wouldn't let me, so I guess I have to copy/paste here :P):
InvalidOperationException: Instance validation error: 'ConditionNode' is not a valid value for TypeOfJourneyPointType.
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderExportType.Read61_TypeOfJourneyPointType (System.String s) (at <dd10c5daf81f4e67b080334b8ed954b6>:0)
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderExportType.Read63_JourneyPointType (System.Boolean isNullable, System.Boolean checkType) (at <dd10c5daf81f4e67b080334b8ed954b6>:0)
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderExportType.Read64_JourneyPointsType (System.Boolean isNullable, System.Boolean checkType) (at <dd10c5daf81f4e67b080334b8ed954b6>:0)
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderExportType.Read65_JourneyType (System.Boolean isNullable, System.Boolean checkType) (at <dd10c5daf81f4e67b080334b8ed954b6>:0)
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderExportType.Read121_ContentType (System.Boolean isNullable, System.Boolean checkType) (at <dd10c5daf81f4e67b080334b8ed954b6>:0)
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderExportType.Read127_ExportType (System.Boolean isNullable, System.Boolean checkType) (at <dd10c5daf81f4e67b080334b8ed954b6>:0)
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderExportType.Read128_Export () (at <dd10c5daf81f4e67b080334b8ed954b6>:0)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
Rethrow as InvalidOperationException: There is an error in XML document (52102, 23).
System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader, System.String encodingStyle, System.Xml.Serialization.XmlDeserializationEvents events) (at <7fd195060d8c41448694ab221d3b56ca>:0)
System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader, System.String encodingStyle) (at <7fd195060d8c41448694ab221d3b56ca>:0)
System.Xml.Serialization.XmlSerializer.Deserialize (System.IO.TextReader textReader) (at <7fd195060d8c41448694ab221d3b56ca>:0)
PixelCrushers.DialogueSystem.Articy.Articy_3_1.Articy_3_1_EditorTools.LoadExportFromXmlFile (System.String xmlFilename, System.Text.Encoding encoding) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Articy/Schemas/Articy 3.1/Articy_3_1_EditorTools.cs:34)
PixelCrushers.DialogueSystem.Articy.Articy_3_1.Articy_3_1_EditorTools.LoadArticyDataFromXmlFile (System.String xmlFilename, System.Text.Encoding encoding, System.Boolean convertDropdownAsString, PixelCrushers.DialogueSystem.Articy.ConverterPrefs prefs) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Articy/Schemas/Articy 3.1/Articy_3_1_EditorTools.cs:28)
PixelCrushers.DialogueSystem.Articy.ArticySchemaEditorTools.LoadArticyDataFromXmlFile (System.String xmlFilename, System.Text.Encoding encoding, System.Boolean convertDropdownAsString, PixelCrushers.DialogueSystem.Articy.ConverterPrefs prefs) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Articy/ArticySchemaEditorTools.cs:20)
PixelCrushers.DialogueSystem.Articy.ArticyConverterWindow.ReviewArticyProject () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Articy/ArticyConverterWindow.cs:672)
PixelCrushers.DialogueSystem.Articy.ArticyConverterWindow.DrawReviewButton () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Articy/ArticyConverterWindow.cs:295)
PixelCrushers.DialogueSystem.Articy.ArticyConverterWindow.DrawConversionButtons () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Articy/ArticyConverterWindow.cs:283)
PixelCrushers.DialogueSystem.Articy.ArticyConverterWindow.OnGUI () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Editor/Tools/Importers/Articy/ArticyConverterWindow.cs:89)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:363)
UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:322)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:401)
UnityEngine.Experimental.UIElements.EventDispatcher.ProcessEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:511)
UnityEngine.Experimental.UIElements.EventDispatcher.Dispatch (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307)
UnityEngine.Experimental.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.Experimental.UIElements.EventBase e, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:176)
UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245)
UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
I have a sneaking suspicion that I simply didn't connect some of my links correctly within the Articy:Draft flow, but maybe you'll have better insight than me. Let me know if you need any additional screenshots or whatever to help troubleshoot. In the meantime, I'll be trawling through my A:D project to see if I missed anything that might be causing this issue.

Thanks!
twobytwogames
Posts: 6
Joined: Tue Jan 22, 2019 5:20 pm

Re: XML Import Problem with Articy:Draft - 'ConditionNode' is not a valid value

Post by twobytwogames »

Hi there - just wanted to follow up and let you know I found the problem by diving into the error code I'd posted.

As it turns out, the error was on line 52102 of the XML
import_error_problem_line.png
import_error_problem_line.png (30.17 KiB) Viewed 524 times
Going there, I found the problem node's ShortId, did a search for it in A:D, and found that it was actually a node inside an Articy:Draft "Journey" that I had saved a while back - one that had a misnamed variable in it (and one that I had corrected/changed in the actual flow). I guess the XML export contained the "Journey" along with everything else (which servers no purpose in Unity - I will make a note to not include those from now on!), but the importer didn't know how to handle the misnamed variable (or the node that contained it, either one I guess), which caused the error.

Anyway, I deleted the Journey, re-exported the same exact way I had previously, and viola - everything imported fine.

Hopefully someone might find this useful if they run into this someday!
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: XML Import Problem with Articy:Draft - 'ConditionNode' is not a valid value

Post by Tony Li »

You only had go through 52106 lines? ;-) Thank you for taking the time to write this up. I'll make sure the next version handles this case.
Post Reply