Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft Translator Provider reports null error after certain period of no query #1467

Open
charlie-wan opened this issue Feb 26, 2024 · 0 comments

Comments

@charlie-wan
Copy link

charlie-wan commented Feb 26, 2024

Environment:
Trados Studio v2022 SP2, Microsoft Translator Provider v1.1.5.0

Symptom:
According to my observation, the provider plugin reports the null reference error after 10 minutes if no translation query is made. If further query is made before the 10 minutes period concludes, the 10 minutes period will be interrupted and re-calculated. The error could be resolved by re-enabling the plugin.

Suspected cause:
I suspected this relates to the authentication token of Azure API, which is valid for 10 minutes according to this page https://learn.microsoft.com/en-us/azure/ai-services/translator/reference/v3-0-reference.

Error logs:
MicrosoftTranslatorProvider.Helpers.TagPlacer: 2024-02-22 14:20:42.3861 Error LogException Value cannot be null.
Parameter name: input
at System.Text.RegularExpressions.Regex.Matches(String input)
at MicrosoftTranslatorProvider.Helpers.TagPlacer.MarkTags(String translation, String pattern)
MicrosoftTranslatorProvider.Helpers.TagPlacer: 2024-02-22 14:20:42.3861 Error LogException Value cannot be null.
Parameter name: input
at System.Text.RegularExpressions.Regex.Matches(String input)
at MicrosoftTranslatorProvider.Helpers.TagPlacer.MarkTags(String translation, String pattern)
MicrosoftTranslatorProvider.Helpers.TagPlacer: 2024-02-22 14:20:42.3861 Error LogException Value cannot be null.
Parameter name: input
at System.Text.RegularExpressions.Regex.Matches(String input)
at MicrosoftTranslatorProvider.Helpers.TagPlacer.MarkTags(String translation, String pattern)
MicrosoftTranslatorProvider.Helpers.TagPlacer: 2024-02-22 14:20:42.3861 Error LogException Value cannot be null.
Parameter name: input
at System.Text.RegularExpressions.Regex.Matches(String input)
at MicrosoftTranslatorProvider.Helpers.TagPlacer.MarkTags(String translation, String pattern)
MicrosoftTranslatorProvider.Helpers.TagPlacer: 2024-02-22 14:20:42.3861 Error LogException Object reference not set to an instance of an object.
at MicrosoftTranslatorProvider.Helpers.TagPlacer.GetTargetElements()
at MicrosoftTranslatorProvider.Helpers.TagPlacer.TryGetTaggedSegment(String returnedText)
at MicrosoftTranslatorProvider.Helpers.TagPlacer.GetTaggedSegment(String returnedText)
MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-02-22 14:20:44.0683 Error HandleError: System.NullReferenceException: Object reference not set to an instance of an object.
at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.RequestTranslation(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.TryTranslate(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.Translate(LanguagePair languagepair, String textToTranslate)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant