We are upgrading from Studio/Groupshare 2017 to Studio/Groupshare 2022 and are adding a server based TM to our local project. When setting credentials to the translation memory URI, we get this error (Stacktrace at the end):
String reference not set to an instance of a String.
Parameter name: s
This is the code:
_tpConfig.Entries.Add(tmprov); _tpConfig.OverrideParent = true; _tradosProject.UpdateTranslationProviderConfiguration(_tpConfig); _tradosProject.Credentials.AddCredential(tmprov.MainTranslationProvider.Uri, false, Account.UserName, Account.Password); _tradosProject.UpdateTranslationProviderConfiguration(_tpConfig);
URI is: sdltm.XXXXXX
Same URI (other host) as we have in current GS2017/Trados2017 environment.
Setting this, works without any exceptions, but when pretranslating process has no access to referenced TMs:
_tradosProject.Credentials.AddCredential("http://XXXXXX", false, Account.UserName, Account.Password);
Code is same as described in your documentation Adding the TM to the Project (rws.com)
And as we have used with Trados 2017/GS 2017, where it works without any issues.
===============================================================
Stacktrace
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at Sdl.LanguagePlatform.TranslationMemoryApi.IdentityInfoCacheCredentialStore.ToUserCredentials(TranslationProviderCredential translationProviderCredential) at Sdl.LanguagePlatform.TranslationMemoryApi.IdentityInfoCacheCredentialStore.AddCredential(Uri uri, TranslationProviderCredential credential) at Sdl.LanguagePlatform.TranslationMemoryApi.TranslationProviderCredentialStore.AddCredential(Uri uri, TranslationProviderCredential credential) at Sdl.ProjectAutomation.FileBased.ProjectCredentials.AddCredential(Uri uri, Boolean useWindowsAuthentication, String user, String password) at zwick.trados.project.automation.tms.trados.TradosProjectServerBased.AddTranslationMemory(String serverTmName, Boolean performUpdate, Boolean performNormalSearch, Boolean performConcordanceSearch, Int32 penalty) in C:\ZwickRoell\Entwicklung\XdocTIQ Publishing\Entwicklung\Zwick\Trados-2022\groupshare\zwick.trados.v2022.project.automation\tms\trados\TradosProjectServerBased.cs:line 94 at zwick.trados.project.automation.tms.trados.TradosProject.AddTranslationMemory(String tmFileName, Boolean performUpdate, Boolean performNormalSearch, Boolean performConcordanceSearch) in C:\ZwickRoell\Entwicklung\XdocTIQ Publishing\Entwicklung\Zwick\Trados-2022\groupshare\zwick.trados.v2022.project.automation\tms\trados\TradosProject.cs:line 371 at zwick.trados.project.automation.tms.trados.TradosProject.AddTranslationMemory(String tmFileName, Boolean performUpdate, Boolean performNormalSearch) in C:\ZwickRoell\Entwicklung\XdocTIQ Publishing\Entwicklung\Zwick\Trados-2022\groupshare\zwick.trados.v2022.project.automation\tms\trados\TradosProject.cs:line 359 at zwick.trados.project.automation.tms.trados.TradosProject.AddTranslationMemory(String tmFileName, Boolean performUpdate) in C:\ZwickRoell\Entwicklung\XdocTIQ Publishing\Entwicklung\Zwick\Trados-2022\groupshare\zwick.trados.v2022.project.automation\tms\trados\TradosProject.cs:line 348 at zwick.trados.project.automation.tms.TradosServerBasedTmsProjectController.AddTranslationMemories() in C:\ZwickRoell\Entwicklung\XdocTIQ Publishing\Entwicklung\Zwick\Trados-2022\groupshare\zwick.trados.v2022.project.automation\tms\TradosServerBasedTmsProjectController.cs:line 294 at zwick.trados.project.automation.tms.TradosServerBasedTmsProjectController.CreateTmsProject() in C:\ZwickRoell\Entwicklung\XdocTIQ Publishing\Entwicklung\Zwick\Trados-2022\groupshare\zwick.trados.v2022.project.automation\tms\TradosServerBasedTmsProjectController.cs:line 271 at zwick.trados.project.automation.tms.TradosServerBasedTmsProjectController.PreTranslate(IEnumerable`1 sourceFilesFolder) in C:\ZwickRoell\Entwicklung\XdocTIQ Publishing\Entwicklung\Zwick\Trados-2022\groupshare\zwick.trados.v2022.project.automation\tms\TradosServerBasedTmsProjectController.cs:line 61 at zwick.project.automation.ExportProjectControllerBase.PreTranslate() in C:\ZwickRoell\Entwicklung\XdocTIQ Publishing\Entwicklung\Zwick\Trados-2022\groupshare\zwick.project.automation.core\ExportProjectControllerBase.cs:line 48 at zwick.project.automation.xmlcms.XmlCmsExportProjectController.PreTranslate() in C:\ZwickRoell\Entwicklung\XdocTIQ Publishing\Entwicklung\Zwick\Trados-2022\groupshare\zwick.project.automation.core\xmlcms\XmlCmsExportProjectController.cs:line 33 at zwick.project.automation.xmlcms.XmlCmsExportProjectController.Run() in C:\ZwickRoell\Entwicklung\XdocTIQ Publishing\Entwicklung\Zwick\Trados-2022\groupshare\zwick.project.automation.core\xmlcms\XmlCmsExportProjectController.cs:line 69 at zwick.project.automation.ProcessController.Run(FileInfo file, ProjectType type) in C:\ZwickRoell\Entwicklung\XdocTIQ Publishing\Entwicklung\Zwick\Trados-2022\groupshare\zwick.project.automation.core\ProcessController
Moved text to code block.
[edited by: Paul at 8:19 AM (GMT 0) on 16 Dec 2022]