TypeError: not all arguments converted during string formatting in CQL
<p>I'm trying to insert a variable string into a Cassandra table using the following code:</p>

<pre><code>b64_enc = "R21haWw="
class SimpleClient:
    session = None

    def create_schema(self):
        self.session.execute("""CREATE KEYSPACE raas WITH replication = {'class':'SimpleStrategy', 'replication_factor':3};""")
        self.session.execute("""
            CREATE TABLE raas.result (
                userb64enc text PRIMARY KEY,
                statusflag int,
                statusstr text
            );
        """)
        log.info('Simplex keyspace and schema created.')

    def load_data(self):

        self.session.execute("""INSERT INTO raas.result (userb64enc, statusflag, statusstr) VALUES(%s,0,'Success');""",  (b64_enc))
        log.info('Data loaded.')
</code></pre>

<p>But I get a </p>

<pre><code>TypeError: not all arguments converted during string formatting
</code></pre>

<p>message. I've also tried using ? in place of the %s, but I get the same error. Any idea on what the cause of this error is?</p>