Login/Register
  • Home
  • Community
  • Knowledge
  • Technical Docs
  • RWS Support Policy
  • Trados Studio Licensing Help
  • Login for Support
Back to Search Results

Trados Studio - Error while performing search operations in the Translation Memories View - "The TM may contain invalid Translation Units" and "Internal Server Error"

000018110 |7/5/2024 9:31 AM
Scope/Environment
Trados Studio
Symptoms/Context
           When a user tries to search "Source Text" or "Target text" in TM Filters having more than one filter to a multiple picklist field, it throws an error as shown below.
            Error Message: "An error occurred when searching the Translation Memory. The TM may contain invalid Translation Units".

Invalid Translation Unit

Scenario-1: Searches in Server-based Translation Memories using a filter on fields that have "Allow Multiple Values" throw an error in Trados Studio's older versions. This is no longer happening starting with Trados Studio 2022 SR2  - 17.2.8.18668.
               
"An error occurred when searching the Translation Memory. The TM may contain invalid Translation Units".

Scenario-2: In case if more than one filter to a Multiple picklist field is applied, it would lead to  " An Internal error occurred".
  • When checked in the Fiddler tool, it is found that the TM service API call fails with response Status code - 500:
/api/tm-service/v1/tms/c41e5c68-df12-4f1c-b234-58d5edb646a9/tus/iterator?source=en-gb&target=de-de 

message=Error: System - Incorrect syntax near the keyword 'order'. (details: System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near the keyword 'order'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TrySetMetaData(_SqlMetaDataSet metaData, Boolean moreInfo)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader 
ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, 
Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at Sdl.LanguagePlatform.TranslationMemoryImpl.Storage.DbStorage.GetTUsWithAttributesAndContexts(DbCommand retrievalCmd, Boolean returnIdContext, Boolean returnContext, Dictionary`2 attributes, CultureInfo sourceCulture, 
CultureInfo targetCulture, Boolean cmIsPrecedingFollowing)
   at Sdl.LanguagePlatform.TranslationMemoryImpl.Storage.SqlStorage.GetTusFiltered(Int32 tmId, FilterExpression filter, Int32 startAfter, Int32 count, Boolean forward, Boolean idContextMatch, Boolean includeContextContent, 
TextContextMatchType textContextMatchType, CultureInfo sourceCulture, CultureInfo targetCulture)
   at Sdl.LanguagePlatform.TranslationMemoryImpl.TranslationUnitServerFilteringStrategy.Sdl.LanguagePlatform.TranslationMemoryImpl.ITranslationUnitFilteringStrategy.GetTusFiltered(PersistentObjectToken translationMemoryId, 
RegularIterator iter, FieldDefinitions fieldDefinitions, Boolean includeContextContent, TextContextMatchType 
textContextMatchType, CultureInfo sourceCulture, CultureInfo targetCulture, Boolean usesIdContextMatch)
   at Sdl.LanguagePlatform.TranslationMemoryImpl.ResourceManager.GetTranslationUnits(PersistentObjectToken tmId, RegularIterator iter, Boolean skipOptimize)
   at Sdl.LanguagePlatform.TranslationMemoryImpl.API.GetTranslationUnits(Container container, PersistentObjectToken tmId, RegularIterator& iter)
ClientConnectionId:299a1bfc-454e-44f5-8d96-76e7d0b48ced
Error Number:156,State:1,Class:15)
Resolution
Scenario-1:  Install Trados Studio 2022 SR2  - 17.2.8.18668. If installing this version is not an option enable the Use Regular expressions option in order to solve this issue.
Use Regular Expression

Scenario-2: Thus by enabling Allow Multiple Value under Translation Memory Settings -->  Fields and Settings solves this issue.
Allow Multiple Value

Scenario-3. In some cases, the error can be avoided by reducing the Number of translation units per page under File > Options > Translation Memories View.
            TM View
 
Root Cause
1. If a user applies more than one filter to a Multiple picklist field (the same probably also applies to a multiple string field), the filter may not be processed correctly in a  Server-based TM, leading to Internal error. this was a defect (CRQ-19632) which is addressed starting with Trados Studio 2022 SR2  - 17.2.8.18668.
2. And in some cases the language pair containing with 500k+ TUs also cause for this issue.
Reference
1. Error when opening a server-based translation memory: "An error occurred when searching the Translation Memory. The TM may contain invalid Translation Units."
 
Send Article Feedback
RWS Machine Translation Translation Software Language Services Content Management
All Contents Copyright © RWS.
COPYRIGHT PRIVACY POLICY COOKIE POLICY TERMS AND CONDITIONS