Python程序在订阅DolphinDB的流表并向表中添加数据后强制退出。

huangapple go评论65阅读模式
英文:

Python program exits forcibly after subscribing to a streaming table in DolphinDB and adding data to the table

问题

一个Python程序在DolphinDB中的一个线程中订阅了一个流表singalTable,然后尝试使用tableInsert将数据插入表中。然而,当调用该函数时,Python程序崩溃并退出。

DolphinDB的最后一个日志如下:

Python程序在订阅DolphinDB的流表并向表中添加数据后强制退出。

有人知道问题出在哪里吗?

英文:

A Python program subscribes to a streaming table singalTable in a thread in DolphinDB and then attempts to insert data into the table using tableInsert. However, when the function is called, the Python program crashes and exits.

The last log of DolphinDB is as follows:

Python程序在订阅DolphinDB的流表并向表中添加数据后强制退出。

Does anyone know where the problem is?

答案1

得分: 1

"IO_ERROR 1"日志中的消息表明API已关闭连接。要解决此问题,需要检查两个事项:

  1. 检查服务器和API版本是否兼容:在升级到版本2.00.9或更高版本后,要接收来自DolphinDB服务器的最新流数据,需要确保Python SDK也升级到相应版本。

  2. 检查是否在写入数据和订阅流表时使用了相同的连接会话:会话不是线程安全的,这种行为可能会导致连接关闭等问题。因此,需要为这两个任务使用不同的会话。

英文:

The IO_ERROR 1 message in the log indicates that the API has closed the connection. To solve this problem, two things need to be checked:

  1. Check whether the server and API versions are compatible: To receive
    latest streaming data from the DolphinDB server after upgrading to
    version 2.00.9 or later, you need to make sure that the Python SDK
    is also upgraded to the corresponding version.
  2. Check whether the same connection session is being used for writing
    data to and subscribing to the streaming table
    :
    Sessions are not
    thread-safe and this behaviour can lead to issues such as connection
    closure. So different sessions are needed for the two tasks.

huangapple
  • 本文由 发表于 2023年6月9日 10:03:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/76436741.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定