我用python-api连接dolphindb,读取数据库时报错了,我的代码如下:
import dolphindb as ddb
s = ddb.session()
s.connect("localhost", 24115,"admin", "123456")
x = s.loadTable(tableName="pt",dbPath="dfs://db1")
数据库和表都是存在的,在DolphinDB的GUI上都能查到。
但是报出下面的错误:
C:\Users\test\anaconda3\lib\site-packages\dolphindb\session.py:69: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
return self.cpp.run(script, *args)
请问是哪里不对?
这个警告应该是在执行下面的语句时报的:
问题应该是numpy版本过高导致的Warning,不影响正常功能,降低numpy版本就可以消除这个警告。