输入'。'不匹配期待EOF(...来自cpe,其中ip = 10.240 [。] ...)“>

时间:2018-06-26 12:50:23

标签: python cassandra

我在卡桑德拉有一张桌子

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

我正在尝试执行此语句

cql_insert = SimpleStatement("INSERT INTO cpe (ip, cpe) VALUES (%s, %s)")
my_dict = dict()
my_dict['o']=["Linux"]
session.execute(cql_insert, ("10.240.165.151 ", my_dict))
string="10.240.165.151"
session.execute('SELECT cpe from cpe where ip='+string) #error here

哪个会引发此错误

SyntaxException: <Error from server: code=2000 [Syntax error in CQL query] message="line 1:36 mismatched input '.' expecting EOF (... from cpe where ivp=10.240[.]...)">

预先感谢

0 个答案:

没有答案