The document cannot be processed since it contains unexpected contents.

Hello, I am having this error message with the latest version of Studio 2022 and the latest version of Word. I can't open a simple Word .docx file in Studio. I tried to open/repair the Word file but that didn't help. Thank you.

emoji
  • Hi  

    Can you please advise if you open the document using browse option from the welcome view in Trados or you are using drag and drop and also do you get any specific message when trying to open the document in trados?

    Best regards, 

    Loredana 

    emoji
  • Hello Ana-Loredana, I get the message whether I open using Welcome view, drag and drop or from the File menu. 

    Attached is a copy of the error message.

    <SDLErrorDetails time="2023-02-07 2:54:08 PM">
      <ErrorMessage>The document cannot be processed since it contains unexpected contents.</ErrorMessage>
      <Exception>
        <Type>Sdl.LanguagePlatform.Core.LanguagePlatformException, Sdl.LanguagePlatform.Core, Version=1.6.0.0, Culture=neutral, PublicKeyToken=c28cdb26c445c888</Type>
        <HelpLink />
        <Source>Sdl.LanguagePlatform.TranslationMemoryTools</Source>
        <HResult>-2146233088</HResult>
        <StackTrace><![CDATA[   at Sdl.LanguagePlatform.TranslationMemoryTools.LinguaSegmentBuilder.VisitSegment(ISegment segment)
       at Sdl.FileTypeSupport.Framework.Bilingual.Segment.AcceptVisitor(IMarkupDataVisitor visitor)
       at Sdl.LanguagePlatform.TranslationMemoryTools.LinguaSegmentBuilder.VisitChildNodes(IAbstractMarkupDataContainer container)
       at Sdl.LanguagePlatform.TranslationMemoryTools.LinguaSegmentBuilder.VisitTagPair(ITagPair tagPair)
       at Sdl.FileTypeSupport.Framework.Bilingual.TagPair.AcceptVisitor(IMarkupDataVisitor visitor)
       at Sdl.LanguagePlatform.TranslationMemoryTools.LinguaSegmentBuilder.VisitChildNodes(IAbstractMarkupDataContainer container)
       at Sdl.LanguagePlatform.TranslationMemoryTools.LinguaSegmentBuilder.VisitTagPair(ITagPair tagPair)
       at Sdl.FileTypeSupport.Framework.Bilingual.TagPair.AcceptVisitor(IMarkupDataVisitor visitor)
       at Sdl.LanguagePlatform.TranslationMemoryTools.LinguaSegmentBuilder.VisitChildNodes(IAbstractMarkupDataContainer container)
       at Sdl.LanguagePlatform.TranslationMemoryTools.LinguaSegmentBuilder.VisitCommentMarker(ICommentMarker commentMarker)
       at Sdl.FileTypeSupport.Framework.Bilingual.CommentMarker.AcceptVisitor(IMarkupDataVisitor visitor)
       at Sdl.LanguagePlatform.TranslationMemoryTools.LinguaSegmentBuilder.VisitChildNodes(IAbstractMarkupDataContainer container)
       at Sdl.LanguagePlatform.TranslationMemoryTools.TUConverter.AppendToLinguaSegment(IAbstractMarkupDataContainer data, Segment result, LinguaTuBuilderSettings flags, List`1& tagAssociations, List`1& textAssociations)
       at Sdl.LanguagePlatform.TranslationMemoryTools.TUConverter.BuildLinguaSegmentInternal(CultureInfo culture, IAbstractMarkupDataContainer segment, LinguaTuBuilderSettings settings, Boolean& hasTrackChanges, List`1& tagAssociations, List`1& textAssociations)
       at Sdl.LanguagePlatform.TranslationMemoryTools.TUConverter.BuildLinguaSegment(CultureInfo culture, ISegment segment, Boolean includeTrackChanges)
       at Sdl.ProjectApi.Helpers.LanguageToolsHelpers.ComputeIdentityStringHash(LanguageTools languageTools, CultureInfo language, ISegment segment, Boolean includeTrackChanges)
       at Sdl.TranslationStudio.Editor.RepetitionTableUpdater.GetSegmentIdentityHash(ISegmentPair segmentPair)
       at Sdl.TranslationStudio.Editor.RepetitionTableUpdater.ProcessSegment(ISegmentPair segmentPair)
       at Sdl.TranslationStudio.Editor.TranslationEditor.Processors.RepetitionProcessor.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApi.BilingualContentHandlerAdapter.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Filters.Processors.SegmentRenumberingBilingualProcessor.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApi.BilingualContentHandlerAdapter.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Framework.Integration.AbstractBilingualProcessorContainer.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Framework.Integration.LocationMarkerLocator.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Processors.Emoji.WordEmojiParserProcessor.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Filters.Processors.RegexEmbeddedBilingualProcessor.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Framework.Integration.AbstractBilingualProcessorContainer.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Framework.Integration.FileExtractor.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.ParagraphUnitOutputService.DirectOutput(IParagraphUnit paragraphUnit)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Services.ParagraphUnitOutputService.Output()
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Parser.ParagraphRoute.Handle(Entity entity)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Word.Routes.Parser.WordDispatchRoute.Handle(Entity entity)
       at Sdl.FileTypeSupport.Filters.MicrosoftOffice.Core.Infrastructure.Dispatcher.Publish[T](T 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.TranslationStudio.Editor.TranslationEditor.TranslatableDocument.Load(IJobExecutionContext context)
       at Sdl.Desktop.Platform.Services.JobRequest.Execute(IJobExecutionContext context)
       at Sdl.Desktop.Platform.Implementation.Services.JobExecuter.Execute(JobData jobData)
       at Sdl.Desktop.Platform.Implementation.ResourceLoggingInternalCommandExecuter`1.ExecuteWithResourceLogging(TCommandData commandData, String message)
       at Sdl.Desktop.Platform.Implementation.Services.Job._worker_DoWork(Object sender, DoWorkEventArgs e)
       at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
       at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)]]></StackTrace>
      </Exception>
      <Environment>
        <ProductName>Trados Studio</ProductName>
        <ProductVersion>Studio17</ProductVersion>
        <EntryAssemblyFileVersion>17.0.5.14757</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows 11 Home</OperatingSystem>
        <ServicePack>NULL</ServicePack>
        <OperatingSystemLanguage>1033</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>ETHELP\Ethel Perez</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>ETHELP</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>16627960 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>

    emoji
  • Hi Ethel, 

    Can you please try and change the file type used before adding it to be processed by trados - 

    Trados Studio file type settings showing checked options for Microsoft Word 2000-2003, 2007-2016, and 2007-2013 with respective file extensions.

    Also there is a related article as the issue might be related to language cloud - but it is for a different file type 

    https://gateway.sdl.com/apex/communityknowledge?articleName=000014415

    Maybe this would help 

    Loredana 

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 9:55 AM (GMT 0) on 29 Feb 2024]
  • Thank you. I read that article but it didn't help. Also, I tried to change the file type as you recommend but it's not possible. This is my configuration:

    Screenshot of Trados Studio file type configuration showing three file types: SDL XLIFF, Microsoft Word 2007-2019, and Microsoft Word 97-2003 with their respective extensions and IDs.

    In the error report above, it says "<ProductVersion>Studio17</ProductVersion>" even though I'm using Studio 2022. I don't know if this has to do with anything. Can someone help me?

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 9:55 AM (GMT 0) on 29 Feb 2024]
  • Thank you very much for your effort. I tried to open the Word file with Studio 2019 and it doesn't work either. And I can't modify the File type as suggested, since only two file types are found in Studio 2022:

    Trados Studio 2022 file type settings showing only two file types: SDL XLIFF and Microsoft Word 2007-2019 with their respective extensions and IDs.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 9:55 AM (GMT 0) on 29 Feb 2024]
  •  

    I suggest you split the file, test both halves.  If one half works then you're lucky because now you can split the one that still fails, test both halves of that.  Keep repeating this until you find the part of the file that contains the unexpected contents.

    It is actually quite a fast process and you only really need to take this as far as a page.  Then you can remove that page and translate the rest of the file in Trados Studio.  The page you can do manually, or use T-Windows maybe, and then put it back into the target file when you're done.

    It would also be helpful if you could share the offending page so we can see whether this is something we can fix with development.

    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
  • Thank you very much. I did split the file nonstop up to a single page, and to a single paragraph. I have been able to open everything except a small section (I'll send it to your personal e-mail).  So, if I hide this section in the whole Word file, it works! I don’t have to delete it, just hide it. Thanks very much for your help.

    emoji
  •  

    Thanks Ethel, and for sending me the bit you isolated.  I took a quick look and if you check this box I think you should be able to handle the entire file normally:

    Trados Studio options menu with 'Extract comments for translation' checkbox highlighted, indicating a solution to handle file translation.

    It worked for me anyway.  I guess you could also remove the comment and that also works :-)

    If it's ok with you I'll pass this over to development as it is definitely a bug so we ca fix it!

    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


    Generated Image Alt-Text
    [edited by: Trados AI at 9:55 AM (GMT 0) on 29 Feb 2024]
  • Hello Paul,

    It didn't work after I checked "Extract comments for translation" so I just hid the sentence that had the comment on it and it worked.

    The same file had another comment that didn't prevent the file to be opened in Studio, so I'm not sure what is happening.

    Thanks for your help.

    emoji