TranslationProviderServer.GetTranslationMemories error

when I use this call:

TranslationProviderServer.GetTranslationMemories([Sdl.LanguagePlatform.TranslationMemoryApi.TranslationMemoryProperties]::Container)

it says "This server does not support TM Server functionality", which is not correct.

how can I track where the issue is?

 

Parents Reply Children
  • UPDATE: since the new updates on our groupshare 2017 (we suffered from some issues) i get the tm list from the aforementioned function. But when i run pretranslate+analyze i get this message:

    Unexpected exception when initalizing task "Analizza file[analyze file]": Impossibile creare un istanza del provider di traduzione [impossible to create a translation provider instance] 'sdltm.xxx.myserver.com/ ENRICO&tmName=Test_2015_enrico_EN'

    The message above gets repeated by:
    sdl.ProjectAutomation.Core.ProjectAutomationException
    Sdl.ProjectApi.ProjectApiException
    Sdl.ProjectAutomation.Core.ProjectAutomationException
    and then:
    System.Collections.Generic.KeyNotFoundException: No identity information found for server 'http://xxx.myserver.com'

    scan/convert/copy/ tasks get done and give correct results.
    The code i use is this:
    $tasks = @();
    $tasks += [Sdl.ProjectAutomation.Core.AutomaticTaskTemplateIds]::PreTranslateFiles;
    $tasks += [Sdl.ProjectAutomation.Core.AutomaticTaskTemplateIds]::AnalyzeFiles;
    $mytasksinfo = $fileBasedProject.RunAutomaticTasks($targetFilesGuids,$tasks);


    I'm kindly asking if You have a clue about this.
  • (besides isn't groupsharekit related to rest API? These calls are done via Trados Studio SDK/dll).

  • The same problem was raised in this discussion.

    The problem was around how the credentials are specified when the TM is referenced in the project. The idea is that you need to specify the url including sdltm, something like this: 

    new Uri($"sdltm.{ServerUri}{Organization}{(Organization != "" ? "/" : "")}{TmName}"))

    Now given you're using powershell toolkit which unfortunately was not update in a while I'm not entirely sure how this is done. Can you have a look at how the TM is referenced in the project from powershell?

    As a general recommendation from a technical perspective I highly recommend using GS 2017 REST API's against using Trados Studio SDK for interacting with GroupShare 2017. I do realize that there's an effort involved in doing it.

    Romulus Crisan | Translation Productivity Development Manager | SDL | (twitter) @cromica_82 | (blog) http://www.romuluscrisan.com/

  • I get the full TMList from server then pick just the matching tm object from the list.

    URIs are not composed but used from what the servers returns us.

    By debugging the script I obtained the TM URI content string and special url characters are UrlEncoded, like that:

    sdltm.xxx.xxx.com/ ENRICO&tmName=Test_2015_enrico_EN

    I don't know if this is correct or not, but from what I could check the url is the same way in GS 2015 and in GS 2017. In 2015 works, in 2017 it doesn't.

    The code used to instantiate the translation provider is this:

    foreach($tmUri in $uriToTMs)
    {
    [Sdl.ProjectAutomation.Core.TranslationProviderConfiguration] $tmConfig = $fileBasedProject.GetTranslationProviderConfiguration();
    $tmtoadd = New-Object Sdl.ProjectAutomation.Core.TranslationProviderReference ($tmUri.uri);
    #next two lines configure options for memories based on TM name matching
    if($tmUri.uri -match "tmName=OLDS"){$penalty = 1;$updateme = $false;}else{$penalty=0;$updateme = $true};
    if($tmUri.uri -match "tmName=All"){$penalty = 1;;$updateme = $false};
    $entry = New-Object Sdl.ProjectAutomation.Core.TranslationProviderCascadeEntry ($tmtoadd, $true, $true, $updateme, $penalty);
    $tmConfig.Entries.Add($entry);
    $fileBasedProject.UpdateTranslationProviderConfiguration($tmConfig);
    }

    $uriToTMs is an array of tm uris as returned from the server.

    I need right now to use SDK API instead of REST calls because I need to configure each project. I couldn't do it with project templates as REST Calls ask me to do.
    Actually REST Api are quicker to implement for sure. I wish for a finer control of project creation in a future update.

    Any Help is really appreciated. I don't know where to look further.