pyodbc.OperationalError: This app has encountered an error

I googled the error message and found plenty of StackOverflow threads:

The overarching theme seems to be that Microsoft’s SQL Server ODBC drivers for Linux are unable to resolve instance names. The problem might be DNS related, as you can read here. Try to use an IP address and corresponding port number instead of the hostname in the connection string.

2 Likes