Getting "An item with the same key has already been added" error in relation to one Word file when creating a new project in SDL Studio 2021, file-based TMs

No matter which SDL Project Template I use, with one Word file (.docx) that I am wanting to translation, during the process "Convert to Translatable Format" in Studio 2021 (SDL Trados Studio 2021 SR1 - 16.1.3.4096), I always get the "An item with the same key has already been added" error. Is there anything I can do to the Word document to allow me to get past this point?



better phrasing
[edited by: Michael Bailey at 11:22 AM (GMT 0) on 4 Mar 2022]
emoji
Parents
  • <SDLErrorDetails time="04.03.2022 12:24:29">
      <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.Filters.MicrosoftOffice.Word.Context.FootnoteParserContext.AddStandardFootnoteReference()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Parser.FootnoteAndEndnoteRefRoute.SetClassVariables(Entity entity)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Parser.FootnoteAndEndnoteRefRoute.Handle(Entity entity)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Parser.WordDispatchRoute.Handle(Entity entity)
       at lambda_method(Closure , IMessage )
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Infrastructure.Dispatcher.Publish(IMessage message)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Services.ParserService.Publish(Entity parsedEntity)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Services.ParserService.Parse()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Parser.DocumentParser.Parse()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.FootnoteAndEndnotes.FootnoteAndEndnoteFileProcessorService.Process(AbstractBilingualContentHandler abstractBilingualContentHandler, String fileName)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Parser.FootnoteReferenceRoute.Handle(Entity entity)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Parser.WordDispatchRoute.Handle(Entity entity)
       at lambda_method(Closure , IMessage )
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Infrastructure.Dispatcher.Publish(IMessage message)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Services.ParserService.Publish(Entity parsedEntity)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Services.ParserService.Parse()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Parser.DocumentParser.Parse()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Parser.DocxParser.ParseNext()
       at Sdl.FileTypeSupport.Framework.Integration.FileExtractor.ParseNext()
       at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.ParseNext()
       at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.Parse()
       at Sdl.ProjectApi.AutomaticTasks.Conversion.ConversionTask.ProcessFile(IExecutingTaskFile executingTaskFile)
       at Sdl.ProjectApi.AutomaticTasks.AbstractFileLevelAutomaticTaskImplementation.Execute()]]></StackTrace>
      </Exception>
      <Environment>
        <ProductName>SDL Trados Studio</ProductName>
        <ProductVersion>Studio16</ProductVersion>
        <EntryAssemblyFileVersion>16.1.3.4096</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows 10 Enterprise</OperatingSystem>
        <ServicePack>NULL</ServicePack>
        <OperatingSystemLanguage>1031</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>******************</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>*******</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>16633160 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>

    Here is the error file

    emoji
  • Have you tried to reset all file types in any of your project templates and using this for creating the project in question?

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

    emoji
  • Thanks for the tip  - I have and it is still not working. Have now also reset SDL Studio 2021 and this one file seems to be causing the problem still.

    emoji
  • Perhaps the solution is to divide and conquer... at least in terms of getting to the root of the problem.  Split the file, test each half and then repeat with the failed half.  Repeat this until you are able to identify something in the file causing the problem or maybe a sentence or a paragraph that you could omit and finish manually outside of Trados Studio.

    It's normally pretty fast to do this, but you could also share the file and we can take a look?  If we can repro we can also log a bug.

    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


  • I'm pursuing the divide and conquer route at the moment and have also just managed to get the document to work by copying all the text into Notepad++ and then back into a fresh Word document (loses the formatting, but that is only secondary in terms of importance now!).

    I have a little macro for Word that carves up documents into chunks of 500 words that I was about to let loose on it!

    emoji
Reply Children