In Python3's pymssql library, the following error can crop up, and I found it to be a little misleading:
File "pymssql.pyx", line 641, in pymssql.connect (pymssql.c:10824) pymssql.OperationalError: (18452, b'Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.DB-Lib error message 20018, severity 14:\nGeneral SQL Server error: Check messages from the SQL Server\nDB-Lib error message 20002, severity 9:\nAdaptive Server connection failed ([IP-Address]:1433)\n')
I knew this wasn't likely to really be an 'untrusted domain' issue, since the script has run fine dozens of times before, and nothing has changed in the domain infrastructure. After digging around for a bit, I realized the script was using an old password to attempt the connection. The password had changed recently.