使用teradata模块从python连接到Teradata导致'WSA E TimedOut'

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用teradata模块从python连接到Teradata导致'WSA E TimedOut'相关的知识,希望对你有一定的参考价值。

我试图使用teradata模块从python连接到Teradata,但它导致TimedOut。

例外是:

(434, '[HY000] [Teradata][WSock32 DLL] (434) WSA E TimedOut: No response received when attempting to connect to the Teradata server')

有没有办法增加python编码方面的超时?

附上截图供参考:

enter image description here

答案

使用udaExec.connect(method =“odbc”,system = host,username = username,password = password,LoginTimeout = 60,driver =“DRIVERNAME”)作为连接:

由于登录可能需要一些时间,因此您将面临错误。您需要添加一个参数LoginTimeout = 60来解决问题。

以上是关于使用teradata模块从python连接到Teradata导致'WSA E TimedOut'的主要内容,如果未能解决你的问题,请参考以下文章

在docker中为python项目加载Teradata ODBC驱动程序时出错

从 GraphQL 到 Teradata 的数据库连接器

使用 python 连接到烧瓶 websocket

使用 Python 中的标准模块连接到 Web 套接字(wss)?

如何使用 Python 模块 wpa_supplicant 连接到安全 WiFi?

当尝试使用 psycopg2 模块通过 python 连接到 redshift 时,会显示以下错误