Error message: An item with the same key has been already added. Happens when adding MT Enhanced Trados Plugin

Hello

Trying to add this MT Google API option in team members trados.   When add the API code and click OK this error pops up.

Error dialog box in Trados Studio with a red cross icon, displaying the message 'An item with the same key has already been added.' and buttons for 'Knowledge Base' and 'Community', with an 'OK' button highlighted.

I found one community topic from 2017 about removing the plugin from three C:\Users  sections.   Did that.   Went to the Web Appstore and downloaded the latest plugin installer for this and re-ran the installation process.   Same error message.

I used the SDL Plungin Management Tool to just check if two versions of the Plugin happened to be on system.   Only one.

This is a brand new Trados install on her computer and upgraded to 2021 SR2  16.2.12.9338

Here is the logger file from the error messsage.

<SDLErrorDetails time="5/2/2023 9:22:10 AM">
  <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.Community.MtEnhancedProvider.ViewModel.MainWindowViewModel.SetGeneralProviderOptions()
   at Sdl.Community.MtEnhancedProvider.ViewModel.MainWindowViewModel.Save(Object window)
   at Sdl.Community.MtEnhancedProvider.Commands.RelayCommand.Execute(Object parameter)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Window.ShowHelper(Object booleanBox)
   at System.Windows.Window.Show()
   at System.Windows.Window.ShowDialog()
   at Sdl.Community.MtEnhancedProvider.MtTranslationProviderWinFormsUI.ShowProviderWindow(LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore, IMtTranslationOptions loadOptions, RegionsProvider regionsProvider)
   at Sdl.Community.MtEnhancedProvider.MtTranslationProviderWinFormsUI.Browse(IWin32Window owner, LanguagePair[] languagePairs, ITranslationProviderCredentialStore credentialStore)
   at Sdl.TranslationStudio.Common.TranslationMemory.TranslationMemoriesControl.pluginContextMenuStripItem_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.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>Trados Studio</ProductName>
    <ProductVersion>Studio16</ProductVersion>
    <EntryAssemblyFileVersion>16.2.12.9338</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 10 Enterprise</OperatingSystem>
    <ServicePack>NULL</ServicePack>
    <OperatingSystemLanguage>1033</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>LIONSCLUBS\bburksaitis</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>LAPTOP-5258</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>16615688 MB</PhysicalMemory>
  </Environment>
</SDLErrorDetails>

No one else has had this issue installing this plugin.  Not certain how to proceed.

David



Generated Image Alt-Text
[edited by: Trados AI at 12:01 PM (GMT 0) on 29 Feb 2024]
Parents
  •  

    You said:

    I found one community topic from 2017 about removing the plugin from three C:\Users  sections.   Did that. 

    Can I just check that you did this?  Delete the following folders and then reinstall your plugins after making sure you have the latest ones for your product, either from the appstore at https://appstore.rws.com/ or by using the integrated appstore in Trads Studio:

    %APPDATA%\SDL\SDL Trados Studio\16\Plugins

    %LOCALAPPDATA%\SDL\SDL Trados Studio\16\Plugins

    c:\ProgramData\SDL\SDL Trados Studio\16\Plugins

    If you have manually downloaded your plugins from the AppStore then double click them to install them again, or preferably download the ones you want and install them via the integrated AppStore in Trados Studio.

    This error is pretty much only ever present when there is a conflict between plugin versions do I think it's worth a second check, manually without using a the plugin management tool to makes sure you really do have empty folders.  Particularly because you said this:

    No one else has had this issue installing this plugin. 

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
  • Hello  

    It was actually from a post you put in for a similar issue back in 2017 stating the above.   I must admit I did not delete the folders.  I did go into each folder and deleted that Plugin.  Would there be much of a difference between deleting the folders and just deleting the file?

    I did go to the Web Appstore to make certain I did have the latest version and used that to re-install.

    I have done this plugin install twice last two weeks in April with no issue.   Only difference between two is I installed the 2021 Trados software and upgraded it to the latest version instead of the IT department installing their version and I upgrade to latest version.

    emoji
  •   

    If you only deleted the plugin then you left the unpacked folder with the old version. So yes… remove the unpacked folders too.

    Would there be much of a difference between deleting the folders and just deleting the file?

    It's because when you delete the folders and add the sdlplugin back it will unpack itself into the unpacked folder.  If you leave the old one there it will not unpack because it'll get the "item with the same key has already been added." error... if the plugin is a different version.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
Reply Children