DeepL plugin crash when running automatic tasks programatically

hi,

I'm trying to run an Analysis through the studio API (from a 3rd party app), and I use the DeepL plugin. However, I get an error message like this:

Unexpected exception when initializing task 'Analyze Files': Failed to create an instance of translation provider 'deepltranslationprovider:///?sendPlain=False'.. ---> Sdl.ProjectApi.ProjectApiException: Unexpected exception when initializing task 'Analyze Files': Failed to create an instance of translation provider 'deepltranslationprovider:///?sendPlain=False'.. ---> Sdl.ProjectAutomation.Core.ProjectAutomationException: Failed to create an instance of translation provider 'deepltranslationprovider:///?sendPlain=False'. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Sdl.Desktop.IntegrationApi.AbstractApplication..ctor()
at Sdl.TranslationStudioAutomation.IntegrationApi.Internal.SdlTradosStudioApplication..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance[T]()
at Sdl.Desktop.IntegrationApi.ApplicationHost`1.get_Application()
at Sdl.Community.DeepLMTProvider.DeepLMtTranslationProviderLanguageDirection..ctor(DeepLMtTranslationProvider deepLMtTranslationProvider, LanguagePair languageDirection)
at Sdl.Community.DeepLMTProvider.DeepLMtTranslationProvider.GetLanguageDirection(LanguagePair languageDirection)
at Sdl.ProjectApi.Helpers.ProjectCascadeFactory.GetTranslationProviderLanguageDirection(TranslationProviderItem translationProviderItem, LanguagePair languageDirection, Boolean performUpdate, Boolean refreshCache)

Based on the stacktrace, it seems that the plugin tries to access the host studio application that does not exist if I use the studio api from a 3rd party application, without starting studio itself.

Can someone help finding a workaround or fixing this?

Several months ago, this used to work still, but seems like an upgrade in the plugin introduced this dependency.

best regards,

Tamas

Parents Reply Children