• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unexpected error: An item with the same key has already been added.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Unexpected error: An item with the same key has already been added.

    I get this error sometimes when switching between workspaces.

    At first I thought it was an error with a Dictionary (C#) I was using - because that can indeed make such an error. However, my dictionary accessing code all checks first before adding a key so it should not be causing this exception. Plus I don't know what kind of code gets triggered upon switch of a workspace... I even disconnected all connnections and it still occurs switching between workspaces , so it cannot be any code in my onbarupdate, market data, etc. events.

    I googled some more and apparently it can be a problem with sql databases making such an exception as well.

    I also don't think it is my code because on one of the offending workspaces I removed all indicators, market analyzers, etc. just one plain chart left with no indicators.

    I even tried make a new untitled workspace and the problem still occurs between switching to and from it... i.e. dialog appears with this error.

    So has anyone seen this message before and know what it is from?

    #2
    What version of NinjaTrader 8 are you using? Please provide the entire version number. This can be found under Help -> About (Example: 8.0.?.?)
    Patrick G.NinjaTrader Customer Service

    Comment


      #3
      18 - 64 bit.. latest version.

      I would say I'm 80% sure it wasn't happening with 17.2 - I mean I only noticed it in the last few days but I'm not sure exactly what day I installed 18

      Comment


        #4
        We've seen this error before but are still working on finding the root cause and the solution.

        Please send me your workspace, log, and trace files so that I may look into what occurred.
        • You can do this by going to the Control Center-> Help-> Email Support
        • Expand 'Other files' and enable 'Workspace files and UI settings' and 'Template files'.
        • Please reference the following ticket number in the body of the email: 2151846 ATTN Patrick G
        Patrick G.NinjaTrader Customer Service

        Comment


          #5
          Hello Patrick,

          I have encountered a similar problem when saving a market analzyer template with a custom column. To reproduce the issue

          -> open a new market analyzer, add a few instruments and then add a new custom market analyzer column
          -> set the input series for the new market analyzer column to "Median"
          -> the market analyzer should now correctly populate
          -> save the market analyzer template with the new custom column as "Test"
          -> open a new market analyzer with a few instruments
          -> load the new market analyzer template "Test"

          The template cannot be loaded but you will get the error message "Unexpected error: An item with the same key has already been added".

          Comment


            #6
            Hi Harry, if you figure out what is going on - please post it here as well, I did not have time to work with support staff to debug it - as well my workspaces are very complicated so figuring it out is not so easy for me.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by RandanAL, Today, 09:05 AM
            0 responses
            2 views
            0 likes
            Last Post RandanAL  
            Started by cstern71, 09-02-2019, 10:30 AM
            4 responses
            60 views
            0 likes
            Last Post Lancer
            by Lancer
             
            Started by Hanstanz, Today, 04:44 AM
            0 responses
            10 views
            0 likes
            Last Post Hanstanz  
            Started by juniortut, Today, 04:38 AM
            0 responses
            5 views
            0 likes
            Last Post juniortut  
            Started by rojiinko, Today, 03:58 AM
            0 responses
            5 views
            0 likes
            Last Post rojiinko  
            Working...
            X