卡桑德拉输入不匹配

2024-04-25 17:07:53 发布

您现在位置:Python中文网/ 问答频道 /正文

我在卡桑德拉的桌子是:

CREATE TABLE cpe (
   ip inet PRIMARY KEY,
   cpe frozen<map<text, frozen<list<text>>>>
); 

我的表中已经有一些元素,我正在尝试基于IP进行选择,但我不断得到错误

mismatched input '.' expecting EOF (... from cpe where ip=10.240[.]...)">

目前我的Python代码如下所示:

rows = session.execute('SELECT ip,cpe from analysis limit 1000')

for i in rows:
   cpe=session.execute('select cpe from cpe where ip='+str(i.ip)) #Error  here

提前谢谢


Tags: keytextfromipexecutesessioncreatetable

热门问题