An item with the same key has already been added - error message

Good morning,

 

Since installing the updates I am receiving the above message repeatedly when confirming segments and the only way to get rid of it is to close the file and reopen it. Any ideas how to get rid of it/resolve the issue?

 

Thanks,

 

Jo

Parents
  • Hi ,

    Try disconnecting your termbases and see if the error continues. If it does not, it may be that you have a term in a termbase that has, for example, been unsuccessfully merged and thus appears to be duplicated.

    This error is often caused by term look-up in MultiTerm but yesterday someone had this problem without a termbase included in the project so I wondered if Autosuggest is picking up something from MultiTerm.

    So, as a test, can you turn off Autosuggest here:

    Uncheck the box I have highlighted and see if that makes a difference.

     

    If neither of the above helps, can you take a look at these two threads and see if either of them contains a solution for you:

    item with same key

    item with same key other suggestions

    If none of the above helps, next time the error occurs, could you post a copy of your error stacktrace, using the 3 steps illustrated as follows:

    Image 'nicked' from . If you look at bottom left of the Error dialogue you can see a 'disk' and if you click on that you can attach it to your post once you've clicked 'Advanced Editing Options' below the post dialog. Then you can access the top toolbar as shown in the 3rd step above.

    Then, someone with more knowledge than I might be able to help more precisely.

    All the best,

    Alison

  • Hi Allison,

    Thanks for your reply. I have worked through the various threads and nothing has helped. I have not actually been using any termbases with the files when this message appears and turning off autosuggest made no difference. Here is the error log.

     

    <SDLErrorDetails time="17/08/2017 13:05:36">
      <ErrorMessage>An item with the same key has already been added.</ErrorMessage>
      <Exception>
        <Type>System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
        <ParamName />
        <HelpLink />
        <Source>mscorlib</Source>
        <HResult>-2147024809</HResult>
        <StackTrace><![CDATA[   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Sdl.FileTypeSupport.Framework.Native.AbstractMetaDataContainer.ReplaceMetaDataWithCloneOf(IEnumerable`1 toClone)
       at Sdl.FileTypeSupport.Framework.Native.AbstractMetaDataContainer..ctor(AbstractMetaDataContainer other)
       at Sdl.FileTypeSupport.Framework.Native.TranslationOrigin.Clone()
       at Sdl.FileTypeSupport.Framework.Native.SegmentPairProperties..ctor(SegmentPairProperties other)
       at Sdl.FileTypeSupport.Framework.Native.SegmentPairProperties.Clone()
       at Sdl.TranslationStudioAutomation.IntegrationApi.Internal.Adaptors.ApiSegmentPair.get_Properties()
       at Sdl.TranslationStudio.Plugins.Bookmarks.BookmarksViewModel.UpdateAutoBookmarks()
       at Sdl.TranslationStudio.Plugins.Bookmarks.BookmarksViewModel._currentDocument_ActiveSegmentChanged(Object sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at Sdl.Desktop.Platform.Extensions.EventsExtensions.Raise(EventHandler e, Object sender)
       at Sdl.TranslationStudioAutomation.IntegrationApi.Document.OnActiveSegmentChanged(Object sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at Sdl.TranslationStudio.Editor.TranslationEditor.SideBySideDocumentEditingView.OnActiveSegmentChanged()
       at Sdl.TranslationStudio.Editor.TranslationEditor.SideBySideDocumentEditingView.SideBySideEditor_ActiveRowChanged(Object sender, ActiveRowChangedEventArgs e)
       at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
       at SideBySideEditor.raise_ActiveRowChanged(Object value0, ActiveRowChangedEventArgs value1)
       at SideBySideEditor.OnActiveRowChanged(Object sender, ActiveRowChangedEventArgs args)
       at SideBySideEditor.set_ActiveRowNumber(Int32 rowNumber)
       at SideBySideEditor.UpdateActiveRow(IEditControl editControl)
       at SideBySideEditor.OnSelectionChanged(Object sender, SelectionChangedEventArgs args)
       at SideBySideEditor.Target_SelectionChanged(Object sender, SelectionChangedEventArgs args)
       at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
       at AbstractFrameworkEditControl.raise_SelectionChanged(Object value0, SelectionChangedEventArgs value1)
       at FrameworkEditControl.OnSelectionChanged(Object sender, SelectionChangedEventArgs args)
       at FrameworkEditControlEventSource.SelectionChanged(FrameworkEditControlEventSource* )
       at Tree.DocumentControl.vl_WindowProc(DocumentControl* , HWND__* , UInt32 , UInt32 , Int32 )
       at FrameworkDocumentControl.vl_WindowProc(FrameworkDocumentControl* , HWND__* h_wnd, UInt32 n_msg, UInt32 w_p, Int32 l_p)
       at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
       at System.Windows.Forms.Control.DefWndProc(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)]]></StackTrace>
      </Exception>
      <Environment>
        <ProductName>SDL Trados Studio</ProductName>
        <ProductVersion>14.0.0.0</ProductVersion>
        <EntryAssemblyFileVersion>14.1.6284.6</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows 10 Home</OperatingSystem>
        <ServicePack>NULL</ServicePack>
        <OperatingSystemLanguage>1033</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>JC\JBC</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>JC</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>8296900 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>

Reply
  • Hi Allison,

    Thanks for your reply. I have worked through the various threads and nothing has helped. I have not actually been using any termbases with the files when this message appears and turning off autosuggest made no difference. Here is the error log.

     

    <SDLErrorDetails time="17/08/2017 13:05:36">
      <ErrorMessage>An item with the same key has already been added.</ErrorMessage>
      <Exception>
        <Type>System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
        <ParamName />
        <HelpLink />
        <Source>mscorlib</Source>
        <HResult>-2147024809</HResult>
        <StackTrace><![CDATA[   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Sdl.FileTypeSupport.Framework.Native.AbstractMetaDataContainer.ReplaceMetaDataWithCloneOf(IEnumerable`1 toClone)
       at Sdl.FileTypeSupport.Framework.Native.AbstractMetaDataContainer..ctor(AbstractMetaDataContainer other)
       at Sdl.FileTypeSupport.Framework.Native.TranslationOrigin.Clone()
       at Sdl.FileTypeSupport.Framework.Native.SegmentPairProperties..ctor(SegmentPairProperties other)
       at Sdl.FileTypeSupport.Framework.Native.SegmentPairProperties.Clone()
       at Sdl.TranslationStudioAutomation.IntegrationApi.Internal.Adaptors.ApiSegmentPair.get_Properties()
       at Sdl.TranslationStudio.Plugins.Bookmarks.BookmarksViewModel.UpdateAutoBookmarks()
       at Sdl.TranslationStudio.Plugins.Bookmarks.BookmarksViewModel._currentDocument_ActiveSegmentChanged(Object sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at Sdl.Desktop.Platform.Extensions.EventsExtensions.Raise(EventHandler e, Object sender)
       at Sdl.TranslationStudioAutomation.IntegrationApi.Document.OnActiveSegmentChanged(Object sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at Sdl.TranslationStudio.Editor.TranslationEditor.SideBySideDocumentEditingView.OnActiveSegmentChanged()
       at Sdl.TranslationStudio.Editor.TranslationEditor.SideBySideDocumentEditingView.SideBySideEditor_ActiveRowChanged(Object sender, ActiveRowChangedEventArgs e)
       at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
       at SideBySideEditor.raise_ActiveRowChanged(Object value0, ActiveRowChangedEventArgs value1)
       at SideBySideEditor.OnActiveRowChanged(Object sender, ActiveRowChangedEventArgs args)
       at SideBySideEditor.set_ActiveRowNumber(Int32 rowNumber)
       at SideBySideEditor.UpdateActiveRow(IEditControl editControl)
       at SideBySideEditor.OnSelectionChanged(Object sender, SelectionChangedEventArgs args)
       at SideBySideEditor.Target_SelectionChanged(Object sender, SelectionChangedEventArgs args)
       at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
       at AbstractFrameworkEditControl.raise_SelectionChanged(Object value0, SelectionChangedEventArgs value1)
       at FrameworkEditControl.OnSelectionChanged(Object sender, SelectionChangedEventArgs args)
       at FrameworkEditControlEventSource.SelectionChanged(FrameworkEditControlEventSource* )
       at Tree.DocumentControl.vl_WindowProc(DocumentControl* , HWND__* , UInt32 , UInt32 , Int32 )
       at FrameworkDocumentControl.vl_WindowProc(FrameworkDocumentControl* , HWND__* h_wnd, UInt32 n_msg, UInt32 w_p, Int32 l_p)
       at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
       at System.Windows.Forms.Control.DefWndProc(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)]]></StackTrace>
      </Exception>
      <Environment>
        <ProductName>SDL Trados Studio</ProductName>
        <ProductVersion>14.0.0.0</ProductVersion>
        <EntryAssemblyFileVersion>14.1.6284.6</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows 10 Home</OperatingSystem>
        <ServicePack>NULL</ServicePack>
        <OperatingSystemLanguage>1033</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>JC\JBC</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>JC</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>8296900 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>

Children