Failed to analyze Frame Maker XLIFF file, "Unable to cast object of type 'Sdl.FileTypeSupport.Framework.Bilingual.Segment' to type 'Sdl.FileTypeSupport.Framework.BilingualApi.ITagPair'.". Need help to resolve and understand the is

Unable to cast object of type 'Sdl.FileTypeSupport.Framework.Bilingual.Segment' to type 'Sdl.FileTypeSupport.Framework.BilingualApi.ITagPair'. File will not analyze and reports a error.  This is for a Frame Maker Structured file that was exported to XLIFF 2.0.Trados Studio task results window showing a failed Convert to Translatable Format task with an error message about an object casting issue related to 'Sdl.FileTypeSupport.Framework.Bilingual.Segment' and 'Sdl.FileTypeSupport.Framework.BilingualApi.ITagPair'.



Generated Image Alt-Text
[edited by: Trados AI at 1:23 PM (GMT 0) on 29 Feb 2024]
emoji
Parents Reply Children
  •   

    I do not see a prompt in FM for xliff 2.0. 

    That's a bit confusing as you said this:

    This is for a Frame Maker Structured file that was exported to XLIFF 2.0.

    However... I don't believe Framemaker does offer an export to XLIFF at all.  So if the source file you have is an XLIFF 2.0 it may be worth running it through a validation tool first to check if it's indeed valid.  Trados Studio is quite strict about these things so that would be my starting point.

    It's also worth checking the error message is this can also be helpful:

    Error dialog box in Trados Studio showing 'Unable to cast object of type Sdl.FileTypeSupport.Framework.Bilingual.Segment' error with options for Knowledge Base and Community.

    1. click on "Knowledge Base" as this uses the error details with the message to search the KB and sometimes finds the right article to help
    2. click on the small disk symbol.  This allows you to save the full error details to your desktop and then you can attach them to your post.  These often contain details that can be helpful too.
    I did get more infomation with the segment but do not know how to decipher where it is in the file...can you assist with what segment this pertains to?

    This will most likely be in the SDLXLIFF, so try searching for that trans-unit id in a decent text editor.  It might be helpful... it might not!

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 10:20 PM (GMT 0) on 29 Mar 2024]
  • Thank you Paul, I have extracted the error message but cannot decipher it correctly.  Can you assist in letting me know more about this issue with the below log report?

    <SDLErrorDetails time="3/29/2024 6:32:18 PM">
    <ErrorMessage>Unable to cast object of type 'Sdl.FileTypeSupport.Framework.Bilingual.Segment' to type 'Sdl.FileTypeSupport.Framework.BilingualApi.ITagPair'.</ErrorMessage>
    <Exception>
    <Type>System.InvalidCastException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
    <HelpLink/>
    <Source>Sdl.FileTypeSupport.Filters.Xliff</Source>
    <HResult>-2147467262</HResult>
    <StackTrace>
    <![CDATA[ at Sdl.FileTypeSupport.Filters.Xliff.Infrastructure.MarkupBuilders.MarkupTagBuilder.EndTagPair(String endTagContent, Dictionary`2 metadata) at Sdl.FileTypeSupport.Filters.Xliff.Infrastructure.Consumers.Parser.GenericGroupPlaceholderEndElementConsumer.Consume(XmlNodeParsed message) at lambda_method(Closure , IMessage ) at Sdl.FileTypeSupport.Filters.Xliff.Infrastructure.InMemoryBus.Publish(IMessage message) at Sdl.FileTypeSupport.Filters.Xliff.Extractor.ParserImpl.Publish(XmlNodeParsed message) at Sdl.FileTypeSupport.Filters.Xliff.Infrastructure.XmlParser.Parse(XmlTextReader reader) at Sdl.FileTypeSupport.Filters.Xliff.Extractor.ParserImpl.Parse(String xliffPath) at Sdl.FileTypeSupport.Filters.Xliff.Parser.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>Trados Studio</ProductName>
    <ProductVersion>Studio16</ProductVersion>
    <EntryAssemblyFileVersion>16.2.12.9338</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 11 Pro</OperatingSystem>
    <ServicePack>NULL</ServicePack>
    <OperatingSystemLanguage>1033</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>AzureAD\JeffCarota</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>DESKTOP-NM0TDJV</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>33267532 MB</PhysicalMemory>
    </Environment>
    </SDLErrorDetails>
    emoji
  •   

    The error log provided from Trados Studio suggests that there's an attempt to treat a segment object as a tag pair object, which is incompatible.

    This error surfaces during the parsing process of your XLIFF file, as indicated by the source `Sdl.FileTypeSupport.Filters.Xliff` and the stack trace pointing towards operations involving tag pairs and parsing XML. The operations involved suggest that the error occurred while the system was trying to end a tag pair during the processing of an XLIFF document, but encountered a segment object instead of the expected tag pair object.

    Given the context, the most likely source of the problem, as I suggested before, is the structure of the XLIFF file being processed, where there might be discrepancies or unexpected formats that the Trados Studio XLIFF parser is not handling correctly. This could be due to custom tags, incorrect nesting of elements, or other anomalies in the XLIFF structure that do not align with what the parser expects. To resolve this issue you probably need to go back to your client and ask then to check that the file is valid xliff.

    But if you want to try and fix it yourself check the XLIFF file for any irregularities in the tag structure, especially around the areas where segments and tag pairs are defined. Look for incorrect nesting or usage of tags that might not be standard.

    You could also use an XLIFF validator tool to ensure that the file conforms to the XLIFF schema. This can help identify structural issues that might not be immediately obvious.

    However, keep in mind that if you fix it yourself the target file might not be compatible with whatever system they used to create the xliff in the first place. So my recommendation would be you validate the error to make sure that this the problem as it’s always possible Trados Studio is the culprit here. Then go back to your customer and explain the problem.

    emoji