Programmatically adding a TM as AnyTM - "Failed to create an instance of translation provider"

We have an automation program which uses the SDK to create projects. This has been working fine for a few years but now that we've started using templates which reference server-based AnyTM TMs we've encountered an exception:

Error dialog in Trados Studio showing 'An error occurred while preparing the file(s)' with details 'Unexpected exception when initializing task 'Analyze Files': Failed to create an instance of translation provider anytm.sdltm.http:...'. The process cannot continue.

Because the TM(s) are server-based I need to add credentials using

project.Credentials.AddCredential(uri, $"user={...};password={...};type={...}");

To obtain the `uri` variable I parse the template as XML and query for the <CascadeEntryItem> elements. I can see from the log file that these are being obtained as I expect so the above method call will effectively have something like this...

project.Credentials.AddCredential(new Uri("anytm.sdltm.http://..."), $"user={...};password={...};type={...}");

So I have two questions:

  1. what might be causing the "instance of translation provider" to fail?
  2. do I need to add the full URI for each TM, i.e.,

        anytm.sdltm.OUR_GROUPSHARE_SERVER/

    or is it enough to use only the host, i.e.,

        anytm.sdltm.http://OUR_GROUPSHARE_SERVER/


Generated Image Alt-Text
[edited by: Trados AI at 4:02 AM (GMT 0) on 5 Mar 2024]