Anyone else getting an 'existing keys' error?

Forums 💬 FlowCanvas ⚙️ Support Anyone else getting an 'existing keys' error?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #22261
    pt
    Participant

      I started getting this error “ArgumentException: An element with the same key already exists in the dictionary.” throughout all of my projects, even after re-installing Unity and flow Canvas, and on an empty project with only the Flow Canvas imported. The error occurs when I try to add a variable to a blackboard. The full error is below, I’m not a coder so its impossible for me to fix, any help would be great as I need it up and running again asap.

      ArgumentException: An element with the same key already exists in the dictionary.
      System.Collections.Generic.Dictionary2[System.Type,System.String].Add (System.Type key, System.String value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
      ParadoxNotion.Design.EditorUtils.GetPreferedTypesSelectionMenu (System.Type type, System.Action
      1 callback, Boolean showInterfaces, UnityEditor.GenericMenu menu, System.String subCategory) (at Assets/ParadoxNotion/FlowCanvas/Framework/_Commons/Design/PartialEditor/EditorUtils/EditorUtils_ContextMenus.cs:67)
      NodeCanvas.Editor.BlackboardEditor.ShowVariables (IBlackboard bb, UnityEngine.Object contextParent) (at Assets/ParadoxNotion/FlowCanvas/Framework/Design/PartialEditor/BlackboardEditor.cs:68)
      NodeCanvas.Editor.GlobalBlackboardInspector.OnInspectorGUI () (at Assets/ParadoxNotion/FlowCanvas/Framework/Design/Editor/Inspectors/GlobalBlackboardInspector.cs:29)
      UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1229)
      UnityEditor.DockArea:OnGUI()

      #22265
      Gavalakis
      Keymaster

        Hello,
        Thanks for the report.
        It seems like there are somehow duplicate types exist in the Preferred Types editor list. Have you modified the Preferred Types list in the editor, and if so, can you please confirm that there is no duplicate types?

        If the above is not the case, a quick fix for this would be to please open up EditorUtils_ContextMenus.cs file and replace line number #67 with this code:

        Please let me know if that works for you.
        Thanks.

        #22264
        pt
        Participant

          Hi,
          correct I have modified the preferred types and accidentally made a duplicate, thanks its fixed for me. Perhaps there could be a preventative measure for this happening?

          thanks a lot,
          PT

          #22263
          Gavalakis
          Keymaster

            Hello,

            Thanks for letting me know that this was the case.
            Hmm. Normally, the same type can not be added on the list more than once (there is a preventing measure). I am really wondering how you managed to do that :). I will check the code again, in case I missed something though.
            Thank you.

            #22262
            pt
            Participant

              yeah its strange, because I noticed it does give me the warning now but wasn’t earlier first time I installed it.

              thanks,
              PT

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.