cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rakesh Kumar <>
Subject Python to type field
Date Wed, 16 Mar 2016 18:18:14 GMT

I have a type defined as follows

    ttype int,
    tvalue text

And this is used in a col of a table as follows

 evetag list <frozen <etag> >

I have the following value in a file
[{ttype: 3 , tvalue: '90A1'}]

This gets inserted via COPY command with no issues.

However when I try to insert the same via a python program which I am
writing. where I prepare and then bind, I get this error while executing

TypeError: Received an argument of invalid type for column "evetag".
Expected: <class 'cassandra.cqltypes.ListType(UserType(Int32Type,
VarcharType))'>, Got: <type 'str'>; (Received a string for a type that
expects a sequence)

I tried casting the variable in python to list, tuple, but same error.

View raw message