GroupShare 2017 TM Server API issue

Former Member
Former Member

Hi,

 

I need your help about GroupShare 2017 API.

Customer is facing issue about GS 2017 TM server API.

 

Symptom

Code which worked fine with SDL Trados Server 2015 fails with GroupShare 2017.

- Adding Server-based to project and exectuting "AnalyzeFile" task, it ralis and ProjectAutomationExceptionga is throuwn.

- The same error happens on Sdl.SDK.ProjectAutomation.Samples.BatchAnalyze prvided by SDL.

 

Attached files

Code.txt … customer’s code.

Task messages.txt… error message.

 

Question

How can "AnalyzeFiles" task be executed wih SDL Trados Server 2017's server-based TM?

 

Expected Result

- analyzeTask.Status should be "completed".

- The length of analyzeTask.Messages should be 0.

 

Current Result

- analyzeTask.Status indicates "failed".

- analyzeTask.Messages includes ProjectAutomationException alwais.

 

If this issue is due to change of API specification, could you please give me some advice to modify the code so that it can work with GS 2017 TM Server.

Many thanks in advance.

  • Is this problem appearing on any project? Would you be able to share the entire error stack trace?

    GS2017 CU4 makes the analysis reports available via the REST API so it might be a better and simpler alternative to just retrieve the analysis using the REST API rather than rely on Trados Studio Project Automation API.

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

  • Hi

    Yes, the problem occurs in all project that I'm creating. Will following error stack trace help you ?

    Thank you very much!

    <SDLErrorDetails time="2017/08/09 18:27:17">
    <ErrorMessage>Unexpected exception when initializing task 'Analyze Files': Failed to create an instance of translation provider 'sdltm.nicgroupshare-test/ Languages/Asian Languages/Japanese&amp;tmName=Japanese RnD Test'..</ErrorMessage>
    <Exception>
    <Type>Sdl.ProjectApi.ProjectApiException, Sdl.ProjectApi, Version=14.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.InitializeTaskImplementations()
    at Sdl.ProjectApi.Implementation.TaskExecution.ContentProcessingTaskImplementation.Execute()
    at Sdl.ProjectApi.Implementation.AutomaticTaskExecuter.Execute()]]></StackTrace>
    <InnerException>
    <Type>Sdl.ProjectAutomation.Core.ProjectAutomationException, Sdl.ProjectAutomation.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=c28cdb26c445c888</Type>
    <HelpLink />
    <Source>Sdl.ProjectAutomation.FileBased</Source>
    <HResult>-2146233088</HResult>
    <StackTrace><![CDATA[ at Sdl.ProjectAutomation.FileBased.Internal.AutomationServerEvents.HandleTranslationProviderException(TranslationProviderItem translationProviderItem, Exception exception)
    at Sdl.ProjectApi.Helpers.ProjectCascadeFactory.GetTranslationProviderLanguageDirection(TranslationProviderItem translationProviderItem, LanguagePair languageDirection, Boolean performUpdate, Boolean refreshCache)
    at Sdl.ProjectApi.Helpers.ProjectCascadeFactory.CreateProjectCascadeEntries(IList`1 projectCascadeEntryDataList, LanguagePair languagePair, Boolean readOnly, Boolean refreshCache)
    at Sdl.ProjectApi.Helpers.ProjectCascadeFactory.CreateCascade(ProjectCascadeSettings projectCascadeSettings, Boolean refreshCache)
    at Sdl.ProjectApi.Helpers.LanguageDirectionHelper.CreateCascade(ILanguageDirection languageDirection, ProjectCascadeEntryDataFilterFunction filter, IComparer`1 sort, Boolean readOnly, Boolean refreshCache)
    at Sdl.ProjectApi.Helpers.LanguageObjectsCache.<>c__DisplayClass4.<GetRecognizers>b__3()
    at Sdl.ProjectApi.Helpers.LanguageObjectsCache.GetOrCreateObject(String key, Func`1 createObject)
    at Sdl.ProjectApi.Helpers.LanguageObjectsCache.GetRecognizers(ILanguageDirection languageDirection)
    at Sdl.ProjectApi.Helpers.LanguageObjectsCache.GetLanguageTools(ILanguageDirection languageDirection)
    at Sdl.ProjectApi.AutomaticTasks.Analysis.AnalysisDataCollectorX.CreateAnalysisDataStorage(ILanguageDirection languageDirection, AnalysisTaskSettings analysisSettings, TranslationMemorySettings translationMemorySettings, ILanguageObjectsCache objectsCache)
    at Sdl.ProjectApi.AutomaticTasks.Analysis.AnalysisDataCollectorX.Initialize(IList`1 files)
    at Sdl.ProjectApi.AutomaticTasks.Analysis.AnalysisTask.CreateAnalysisDataCollectors()
    at Sdl.ProjectApi.AutomaticTasks.Analysis.AnalysisTask.InitializeTask(IExecutingAutomaticTask task)
    at Sdl.ProjectApi.Implementation.TaskExecution.ContentProcessingTaskImplementation.InitializeTaskImplementations()]]></StackTrace>
    <InnerException>
    <Type>System.Collections.Generic.KeyNotFoundException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
    <HelpLink />
    <Source>Sdl.Enterprise2.Platform.Client</Source>
    <HResult>-2146232969</HResult>
    <StackTrace><![CDATA[ at Sdl.Enterprise2.Platform.Client.IdentityModel.IdentityInfoCache.ValidateKey(String key)
    at Sdl.Enterprise2.Platform.Client.IdentityModel.IdentityInfoCache.GetIdentityInfo(String key)
    at Sdl.LanguagePlatform.TranslationMemoryApi.IdentityInfoCacheCredentialStore.GetCredential(Uri uri)
    at Sdl.LanguagePlatform.TranslationMemoryApi.TranslationProviderCredentialStore.GetCredential(Uri uri)
    at Sdl.LanguagePlatform.TranslationMemoryApi.ServerBasedTranslationMemoryFactory.CreateTranslationProvider(Uri translationProviderUri, String translationProviderState, ITranslationProviderCredentialStore credentialStore)
    at Sdl.LanguagePlatform.TranslationMemoryApi.TranslationProviderManager.CreateTranslationProvider(Uri translationProviderUri, String translationProviderState, ITranslationProviderCredentialStore credentialStore)
    at Sdl.ProjectApi.TranslationProviderCache.CreateTranslationProvider(Uri translationProviderUri, String translationProviderState, ITranslationProviderCredentialStore credentialStore)
    at Sdl.ProjectApi.TranslationProviderCache.GetTranslationProvider(Uri translationProviderUri, String translationProviderState, ITranslationProviderCredentialStore credentialStore, Boolean performUpdate, Boolean refreshCache)
    at Sdl.ProjectApi.Helpers.ProjectCascadeFactory.GetTranslationProviderLanguageDirection(TranslationProviderItem translationProviderItem, LanguagePair languageDirection, Boolean performUpdate, Boolean refreshCache)]]></StackTrace>
    </InnerException>
    </InnerException>
    </Exception>
    <Environment>
    <ProductName>SDL Trados Studio</ProductName>
    <ProductVersion>14.0.0.0</ProductVersion>
    <EntryAssemblyFileVersion>14.1.6284.6</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 10 Pro</OperatingSystem>
    <ServicePack>NULL</ServicePack>
    <OperatingSystemLanguage>1041</OperatingSystemLanguage>
    <CodePage>932</CodePage>
    <LoggedOnUser>AMER\riekom</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>WIN10SDL2017</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>8388084 MB</PhysicalMemory>
    </Environment>
    </SDLErrorDetails>



  • I started looking into github.com/.../groupsharekit.net with the hopes that it would include some sample on using what you suggested: GS2017 CU4 makes the analysis reports available via the REST API so it might be a better and simpler alternative to just retrieve the analysis using the REST API rather than rely on Trados Studio Project Automation API.
    But, I cannot see where in that code AnalysisReport is used. Can you additional information on how to use AnalysisReport?

    Also, has anyone been able to resolve the issue with ProjectBased API yet?

    Thank you!
    Rieko
  • Hi Rieko,

    The project for what you want to run the Analysis must be created from Groupshare. Is not working for projects created in Studio and published in GS.

    This is a code sample on how you can use Analyse report from GroupShare Kit:

    public async Task AnalysisReports()
    {
    var groupShareClient = await Helper.GetGroupShareClient();
    var report = await groupShareClient.Project.GetAnalysisReports("522dde85-7f5b-4aa5-a4d9-af97d78798f2", "en-US");
    Assert.True(report.Count > 0);
    }

     

    More code sample on how you can use the library you can find here.

    Kind regards,

    Andrea.

  • Hi ,

    Thank you for your answer! The fact that project must be created from groupshare is a big concern for our company because we have heavy projects with millions of words run in parallel in several languages. So, we have to go back to solving the issue with ProjectAutomation API.

    ,
    Have you had a chance to look at error stack trace I submitted a while back in August 9? Will that give you any clue as to what I need to fix?

    Thank you very much!
    Rieko
  • Hi Rieko,

    This seems to be a product in the product. Can you please raise this issue with support?

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

  • I just made some tests around this issue which where able to reproduce. There are few things to be considered:

    1. For TM address make sure to use this format new Uri($"sdltm.{ServerUri}{Organization}{(Organization != "" ? "/" : "")}{TmName}"); 
    2. When adding credentials make sure the URI from point 1 is used.

    You can also have a look at the sample code here. I used for testing with which I had similar problems before I adjusted it according to above points.

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

  • Hi 

    I got your sample code to work in our environment!  

    But, your sample code seems to only work with SDL credential.  If I set useWindowsAuthentication to true, and use windows username and password, then, the code comes back with error...

    Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.  Inner Exception: System.ArgumentException: Requested value 'Windows' was not found.  

    Have you ever tested your code using windows credential?

    project.Credentials.AddCredential(tmAddress, true, UserName, Password);

    I have also tried using Uri("http://nicgroupshare-test:80") as tmAddress input (as suggested on this page http://producthelp.sdl.com/SDK/ProjectAutomationApi/3.0/html/388c870e-0e80-4381-a46a-fe57821571f9.htm), but then the analysis automatic task fails with

    Unexpected exception when initializing task 'Analyze Files': Failed to create an instance of translation provider 'sdltm.http://nicgroupshare-test:80/?orgPath=/All Languages/Asian Languages/Japanese&tmName=Japanese RnD Test'..

    What else can I try?

    Thank you!

    Rieko