Error with batch task Pretranslate with AI Professional

Hi

I created a batch task with "Pretranslate files" followed by "Pretranslate files with AI Professional", where the prompt is "Refine translation" in order to update the translation provided by ModernMT wiht terminlogy present in Multiterm.

It does not work (it worked only ones after installing the new update of the plugin but then it kept on gettin an error). Mostly I get the error during the task "Pretranslate files", sometimes the first task is successful and I get the error for the task "Pretranslate with AI Professional". Error attached.

I tried to do it separately, I do not get errors, but the second task Pretranslate with AI Professional does not change anything.

Kind regards,

Angelo

<SDLErrorDetails time="20.02.2024 17:28:34">
  <ErrorMessage>Unexpected exception when configuring file multiFileConverter for task 'Pre-translate Files with AI Professional': The constructor to deserialize an object of type 'Sdl.Terminology.TerminologyProvider.Core.Exceptions.InvalidCredentialsException' was not found..</ErrorMessage>
  <Exception>
    <Type>Sdl.ProjectApi.ProjectApiException, Sdl.ProjectApi, Version=17.0.0.0, Culture=neutral, PublicKeyToken=c28cdb26c445c888</Type>
    <HelpLink />
    <Source>Sdl.ProjectApi.Implementation</Source>
    <HResult>-2146233088</HResult>
    <StackTrace><![CDATA[   at Sdl.ProjectApi.Implementation.TaskExecution.ContentProcessingTaskImplementation.TaskFileExecuter.ConfigureConverter(IMultiFileConverter multiFileConverter, Language targetLanguage)
   at Sdl.ProjectApi.Implementation.TaskExecution.ContentProcessingTaskImplementation.TaskFileExecuter.CreateMultiFileConverter(IProjectFile tf, String filePath)
   at Sdl.ProjectApi.Implementation.TaskExecution.ContentProcessingTaskImplementation.TaskFileExecuter.Parse(String targetFilePath)]]></StackTrace>
    <InnerException>
      <Type>System.Exception, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
      <HelpLink />
      <Source>Sdl.ProjectAutomation.FileBased</Source>
      <HResult>-2146233088</HResult>
      <StackTrace><![CDATA[   at Sdl.ProjectAutomation.FileBased.FileBasedProject.RunAutomaticTask(Guid[] projectFileIds, String taskTemplateId)
   at AIProfessional.BatchTasks.AIProfessionalPreTranslateFiles_Id.ConfigureConverter(ProjectFile projectFile, IMultiFileConverter multiFileConverter)
   at Sdl.ProjectApi.Implementation.TaskExecution.ContentProcessingTaskImplementationAdapter.ConfigureConverter(IExecutingTaskFile executingTaskFile, IMultiFileConverter multiFileConverter)
   at Sdl.ProjectApi.Implementation.TaskExecution.ContentProcessingTaskImplementation.TaskFileExecuter.ConfigureConverter(IMultiFileConverter multiFileConverter, Language targetLanguage)]]></StackTrace>
      <InnerException>
        <Type>System.Exception, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
        <HelpLink />
        <Source>Sdl.ProjectAutomation.FileBased</Source>
        <HResult>-2146233088</HResult>
        <StackTrace><![CDATA[   at Sdl.ProjectAutomation.FileBased.FileBasedProject.RunAutomaticTask(Guid[] projectFileIds, String taskTemplateId, EventHandler`1 statusEventHandler, EventHandler`1 messageEventHandler)
   at Sdl.ProjectAutomation.FileBased.FileBasedProject.RunAutomaticTask(Guid[] projectFileIds, String taskTemplateId)]]></StackTrace>
        <InnerException>
          <Type>System.Runtime.Serialization.SerializationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
          <HelpLink />
          <Source>mscorlib</Source>
          <HResult>-2146233076</HResult>
          <StackTrace><![CDATA[   at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
   at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
   at System.Runtime.Serialization.ObjectManager.DoFixups()
   at System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(HeaderHandler handler, ISerParser serParser)
   at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream serializationStream, HeaderHandler handler)
   at Sdl.ProjectApi.Implementation.Util.DeserializeException(String s)
   at Sdl.ProjectApi.Implementation.Xml.ExecutionMessage.get_Exception()
   at Sdl.ProjectApi.Implementation.ExecutionMessage.get_Exception()
   at Sdl.ProjectAutomation.FileBased.Converters.ExecutionMessageConverter.CreateExecutionMessage(IExecutionMessage m)
   at Sdl.ProjectAutomation.FileBased.AutomaticTasksProcessor.<>c__DisplayClass11_0.<ConvertMessages>b__1(IExecutionMessage m)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at Sdl.ProjectAutomation.FileBased.AutomaticTasksProcessor.ConvertMessages(IAutomaticTask projectApiAutomaticTask)
   at Sdl.ProjectAutomation.FileBased.AutomaticTasksProcessor.CreateAutomaticTaskObject(IAutomaticTask projectApiAutomaticTask)
   at Sdl.ProjectAutomation.FileBased.AutomaticTasksProcessor.RunAutomaticTask(IEnumerable`1 projectFileIds, String taskTemplateId, EventHandler`1 statusEventHandler, EventHandler`1 messageEventHandler)
   at Sdl.ProjectAutomation.FileBased.FileBasedProject.RunAutomaticTask(Guid[] projectFileIds, String taskTemplateId, EventHandler`1 statusEventHandler, EventHandler`1 messageEventHandler)]]></StackTrace>
          <InnerException>
            <Type>System.Runtime.Serialization.SerializationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
            <HelpLink />
            <Source>mscorlib</Source>
            <HResult>-2146233076</HResult>
            <StackTrace><![CDATA[   at System.Runtime.Serialization.ObjectManager.GetConstructor(RuntimeType t)
   at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)]]></StackTrace>
          </InnerException>
        </InnerException>
      </InnerException>
    </InnerException>
  </Exception>
  <Environment>
    <ProductName>Trados Studio</ProductName>
    <ProductVersion>Studio17</ProductVersion>
    <EntryAssemblyFileVersion>17.2.9.18688</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 11 Pro</OperatingSystem>
    <ServicePack>NULL</ServicePack>
    <OperatingSystemLanguage>1040</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>Office2022Win11\angelo.caltagirone</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>OFFICE2022WIN11</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>33257044 MB</PhysicalMemory>
  </Environment>
</SDLErrorDetails>

emoji
  • HI, another error message, this time with the first pretransalte task:

    <SDLErrorDetails time="21.02.2024 10:58:30">
      <ErrorMessage>One or more errors occurred.</ErrorMessage>
      <Exception>
        <Type>System.AggregateException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
        <HelpLink />
        <Source>mscorlib</Source>
        <HResult>-2146233088</HResult>
        <StackTrace><![CDATA[   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
       at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
       at System.Threading.Tasks.Task`1.get_Result()
       at AIProfessional.Providers.TranslationProvider.AITranslationProviderLanguageDirection.SearchTranslationUnitsMasked(SearchSettings settings, TranslationUnit[] translationUnits, Boolean[] mask)
       at Sdl.LanguagePlatform.TranslationMemoryApi.Cascade`1.SearchTranslationUnitsMaskedCommand.Execute(T cascadeEntry, SearchSettings searchSettings)
       at Sdl.LanguagePlatform.TranslationMemoryApi.Cascade`1.ExecuteSearchCommand(SearchCommand`1 searchCommand, SearchSettings searchSettings, Int32 searchResultsCount, IEnumerable`1& cascadeMessages)]]></StackTrace>
        <InnerException>
          <Type>System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
          <HelpLink />
          <Source>AIProfessional</Source>
          <HResult>-2147467261</HResult>
          <StackTrace><![CDATA[   at AIProfessional.Providers.TranslationProvider.AITranslationProviderLanguageDirection.<GetSearchResults>d__34.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at AIProfessional.Providers.TranslationProvider.AITranslationProviderLanguageDirection.<ProcessTasks>d__33.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at AIProfessional.Providers.TranslationProvider.AITranslationProviderLanguageDirection.<>c__DisplayClass32_0.<<SearchTranslationUnitsMasked>b__0>d.MoveNext()]]></StackTrace>
        </InnerException>
      </Exception>
      <Environment>
        <ProductName>Trados Studio</ProductName>
        <ProductVersion>Studio17</ProductVersion>
        <EntryAssemblyFileVersion>17.2.9.18688</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows 11 Pro</OperatingSystem>
        <ServicePack>NULL</ServicePack>
        <OperatingSystemLanguage>1040</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>Laptop2022Win11\angelo.caltagirone</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>LAPTOP2022WIN11</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>33258180 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>

    Trados Studio Batch Processing Finish screen showing an error message for Pre-translate Files task with 1 message reported and 1 error.

    If I repeat pre-translate files alone I do not get any error message.

    EDIT: no, even now when I run the batch task alone I get the same error message, strange, normally ti works.

    Regards, Angelo



    Generated Image Alt-Text
    [edited by: Trados AI at 1:43 PM (GMT 0) on 29 Feb 2024]
  • BTW, in all these cases I have AI Professional as translation provider in the project.

    emoji
  • Further Update: I got the errors when I run the batch tasks with two files. I run it on one file (I have still to check, if Pretranslate with AI Professional made any changes on the translations done by the ModernMT plugin) and it worked without any errors. Then I run the batch task on the second file and I got this error on the first task:

    <SDLErrorDetails time="21.02.2024 11:21:30">
      <ErrorMessage>One or more errors occurred.</ErrorMessage>
      <Exception>
        <Type>System.AggregateException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
        <HelpLink />
        <Source>mscorlib</Source>
        <HResult>-2146233088</HResult>
        <StackTrace><![CDATA[   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
       at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
       at System.Threading.Tasks.Task`1.get_Result()
       at AIProfessional.Providers.TranslationProvider.AITranslationProviderLanguageDirection.SearchTranslationUnitsMasked(SearchSettings settings, TranslationUnit[] translationUnits, Boolean[] mask)
       at Sdl.LanguagePlatform.TranslationMemoryApi.Cascade`1.SearchTranslationUnitsMaskedCommand.Execute(T cascadeEntry, SearchSettings searchSettings)
       at Sdl.LanguagePlatform.TranslationMemoryApi.Cascade`1.ExecuteSearchCommand(SearchCommand`1 searchCommand, SearchSettings searchSettings, Int32 searchResultsCount, IEnumerable`1& cascadeMessages)]]></StackTrace>
        <InnerException>
          <Type>System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
          <HelpLink />
          <Source>AIProfessional</Source>
          <HResult>-2147467261</HResult>
          <StackTrace><![CDATA[   at AIProfessional.Providers.TranslationProvider.AITranslationProviderLanguageDirection.<GetSearchResults>d__34.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at AIProfessional.Providers.TranslationProvider.AITranslationProviderLanguageDirection.<ProcessTasks>d__33.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at AIProfessional.Providers.TranslationProvider.AITranslationProviderLanguageDirection.<>c__DisplayClass32_0.<<SearchTranslationUnitsMasked>b__0>d.MoveNext()]]></StackTrace>
        </InnerException>
      </Exception>
      <Environment>
        <ProductName>Trados Studio</ProductName>
        <ProductVersion>Studio17</ProductVersion>
        <EntryAssemblyFileVersion>17.2.9.18688</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows 11 Pro</OperatingSystem>
        <ServicePack>NULL</ServicePack>
        <OperatingSystemLanguage>1040</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>Laptop2022Win11\angelo.caltagirone</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>LAPTOP2022WIN11</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>33258180 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>

    I run the batcht task "Pretranslate files" alone and I got the same error. Then I deactivated AI Professional form the TM provider and I could pretranslate the file.

    emoji
  • Hi, this time it worked without error, but the second batch did not work.

    I really do not know what to do, and I would appreciate, if somebody could get me some answers.

    Thanks and regards,

    Angelo

    emoji
  •  

    Please can you clear all your plugins from these folders, then reinstall the AI Professional from the appstore and try again.

    %APPDATA%\Trados\Trados Studio\17\Plugins

    %LOCALAPPDATA%\Trados\Trados Studio\17\Plugins

    c:\ProgramData\Trados\Trados Studio\17\Plugins

    At this point I think it is sensible to make sure there is nothing else at play here.

    Can you also make sure that the ModernMT plugin provides your translations when the AI Professional plugin is not activated in your project at all.

    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
  • Hi Paul, I will do that. But in order to unerstand, if the plugin works, I need to install the ModernMT plugin, too and leave all other plugins.

    To your last question: yes, ModernMT is pretranslating the file. I know that AI Professional is doing nothing because I set the option to turn the segment as a TM result and not a NMT result. As all pretranslated segments where NMT, AI Professional did not change any segments after they were pretranslated with ModernMT.

    Thanks and regards,

    Angelo

    emoji
  • Hi  

    I cleared all plugins and installed only ModernMT and AI Professional.

    I could not pretranslate the file. I got this error:

    <SDLErrorDetails time="05.03.2024 12:37:02">
      <ErrorMessage>The constructor to deserialize an object of type 'Sdl.Terminology.TerminologyProvider.Core.Exceptions.InvalidCredentialsException' was not found.</ErrorMessage>
      <Exception>
        <Type>System.Runtime.Serialization.SerializationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
        <HelpLink />
        <Source>mscorlib</Source>
        <HResult>-2146233076</HResult>
        <StackTrace><![CDATA[   at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
       at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
       at System.Runtime.Serialization.ObjectManager.DoFixups()
       at System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(HeaderHandler handler, ISerParser serParser)
       at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream serializationStream, HeaderHandler handler)
       at Sdl.ProjectApi.Implementation.Util.DeserializeException(String s)
       at Sdl.ProjectApi.Implementation.Xml.ExecutionMessage.get_Exception()
       at Sdl.ProjectApi.Implementation.ExecutionMessage.get_Exception()
       at Sdl.TranslationStudio.Common.Tasks.ExecutionMessagesControl.AddMessage(IExecutionMessage message, String fileName)
       at Sdl.TranslationStudio.Common.Tasks.ExecutionMessagesControl.AddMessages(IEnumerable`1 messages, String fileName)
       at Sdl.TranslationStudio.Common.Tasks.TaskExecutionMessagesControl.AddMessages()
       at Sdl.TranslationStudio.Common.Tasks.TaskExecutionMessagesControl.set_ScheduledTask(IScheduledTask value)
       at Sdl.TranslationStudio.Common.Tasks.ScheduledTaskDetailsControl.FillMessages()
       at Sdl.TranslationStudio.Common.Tasks.ScheduledTaskDetailsControl.FillData()
       at Sdl.TranslationStudio.Common.Tasks.ScheduledTaskDetailsControl.set_ScheduledTask(IScheduledTask value)
       at Sdl.TranslationStudio.Common.Tasks.ScheduledTaskDetailsDialog.set_ScheduledTask(IScheduledTask value)
       at Sdl.TranslationStudio.Common.Tasks.ScheduledTasksResultsControl.ShowResults()
       at Sdl.TranslationStudio.Common.Tasks.ScheduledTasksResultsControl._showResultsButton_Click(Object sender, EventArgs e)
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.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>
        <InnerException>
          <Type>System.Runtime.Serialization.SerializationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
          <HelpLink />
          <Source>mscorlib</Source>
          <HResult>-2146233076</HResult>
          <StackTrace><![CDATA[   at System.Runtime.Serialization.ObjectManager.GetConstructor(RuntimeType t)
       at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)]]></StackTrace>
        </InnerException>
      </Exception>
      <Environment>
        <ProductName>Trados Studio</ProductName>
        <ProductVersion>Studio17Beta</ProductVersion>
        <EntryAssemblyFileVersion>17.2.10.19024</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows 11 Pro</OperatingSystem>
        <ServicePack>NULL</ServicePack>
        <OperatingSystemLanguage>1040</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>Office2022Win11\angelo.caltagirone</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>OFFICE2022WIN11</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>33257044 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>

    Kind regards,

    Angelo

    emoji
  • I retried to pretranslate without AI Professional I got the same error. I had to deactivate AI Professional in order to do a normal pretranslate with ModernMT

    emoji
  • Hi , I know, this is not first priority, but this could be a great help if it would work in a batch task. Working as companion it is sometimes useful, but it takes too much time and since the focus stays on the companion view and does not go back to the editor view, it is really time consuming.

    Thank you for your help and kind regards,

    Angelo

    emoji
  •  

    It already does work... most of the time... and I created a short video to show you how to do this.  I couldn't use it with ModernMT as I don't have a subscription to test it with, but I did use DeepL just so I could use something we don't provide ourselves as a test:

    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