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.?.?)

    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

        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


              #7
              I opened my ninjascript output and i having the same error (Error@OnMarketData:An entry with the same key already exists.)

              "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."

              Did you guys found out what the problem is?

              Comment


                #8
                Madtrade,

                Thanks for posting.


                I would recommend taking the same steps mentioned above to send the Platform Support team your diagnostic files for further investigation.
                Drew O.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by The_Sec, Yesterday, 03:37 PM
                1 response
                11 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by vecnopus, Today, 06:15 AM
                0 responses
                1 view
                0 likes
                Last Post vecnopus  
                Started by Aviram Y, Today, 05:29 AM
                0 responses
                5 views
                0 likes
                Last Post Aviram Y  
                Started by quantismo, 04-17-2024, 05:13 PM
                3 responses
                27 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by ScottWalsh, 04-16-2024, 04:29 PM
                7 responses
                36 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Working...
                X