Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 10227 invoked from network); 19 Nov 2010 18:12:21 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Nov 2010 18:12:21 -0000 Received: (qmail 6322 invoked by uid 500); 19 Nov 2010 18:12:48 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 6241 invoked by uid 500); 19 Nov 2010 18:12:48 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 6233 invoked by uid 99); 19 Nov 2010 18:12:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Nov 2010 18:12:48 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of diptidmathur@gmail.com designates 209.85.215.172 as permitted sender) Received: from [209.85.215.172] (HELO mail-ey0-f172.google.com) (209.85.215.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Nov 2010 18:12:44 +0000 Received: by eyd10 with SMTP id 10so2943854eyd.31 for ; Fri, 19 Nov 2010 10:12:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=/jvrnVK9hcDzGkercZHQGD5nFMZiS1drJtMduoJ2sGM=; b=xUXSvKxNDTsZ0c7SQb/zcGpsjbzkgljmo21LFSGDgC/lTydfmFFJ6w86d5+gRnPjzo kZ6c7CG7WS7Y7urzE3kShkoBXorZFMOtbgW4Uk3d1grIXpi2XBpGClQnfnqcAmWbSiKU 8PYcSpGA+GanHiXVBt0IWehu8j3WpuL3kVvbA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=c/JzXYR6yHbfekg3CuhQF2rgpY8w0PEpKnwiGuKtoO33VwoozNV9elc7JXovNs3j42 MzcluLLYXuvbZmbAE/jL10cZQsgNj15xMvQJbafX6DW+wSqjkxzZyFUzeTJ+V/sty1gr NNtriPurg66eS6EUF1hRBvLWZVHdg7Kpbcf7Y= Received: by 10.216.4.2 with SMTP id 2mr2578402wei.87.1290190337970; Fri, 19 Nov 2010 10:12:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.22.132 with HTTP; Fri, 19 Nov 2010 10:11:57 -0800 (PST) In-Reply-To: References: From: Dipti Mathur Date: Fri, 19 Nov 2010 23:41:57 +0530 Message-ID: Subject: Re: Pycassa: Error inserting supercolumn To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016364c7b9fc9a6c604956bd84c --0016364c7b9fc9a6c604956bd84c Content-Type: text/plain; charset=ISO-8859-1 Thanks Jonathan. But I made changes to sync_cassandra.py file there to include the supercolumn. However looks like that has been the issue. I am not doing something right there. If I want to recreate the keyspace, how is it done? I have the yaml ready. Regards, Dipti On Fri, Nov 19, 2010 at 10:23 PM, Jonathan Ellis wrote: > Twissandra doesn't use supercolumns. > > On Fri, Nov 19, 2010 at 10:49 AM, Dipti Mathur > wrote: > > Hi, > > While trying to insert a new supercolumn into the keyspace, I get the > > following error: > >>>> tweet = TWEET.insert('4c540492-efd9-11df-a192-0022fa5e3348',{'by': > >>>> {'a':'to'}}) > > Traceback (most recent call last): > > File "", line 1, in > > File "/home/dipti/src/pycassa/pycassa/columnfamily.py", line 689, in > > insert > > write_consistency_level=write_consistency_level) > > File "/home/dipti/src/pycassa/pycassa/columnfamily.py", line 711, in > > batch_insert > > batch.send() > > File "/home/dipti/src/pycassa/pycassa/batch.py", line 67, in send > > self.client.batch_mutate(mutations, write_consistency_level) > > File "/home/dipti/src/pycassa/pycassa/connection.py", line 228, in > > _client_call > > return getattr(conn.client, attr)(*args, **kwargs) > > File "/home/dipti/src/pycassa/pycassa/cassandra/Cassandra.py", line > 803, > > in batch_mutate > > self.send_batch_mutate(mutation_map, consistency_level) > > File "/home/dipti/src/pycassa/pycassa/cassandra/Cassandra.py", line > 811, > > in send_batch_mutate > > args.write(self._oprot) > > File "/home/dipti/src/pycassa/pycassa/cassandra/Cassandra.py", line > 3984, > > in write > > oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, > > self.thrift_spec))) > > TypeError: expected string or Unicode object, dict found > > The keyspace has been constructed as in the Twissandra example. > > > > Regards, > > Dipti > > > > -- > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder of Riptano, the source for professional Cassandra support > http://riptano.com > --0016364c7b9fc9a6c604956bd84c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks Jonathan.

But I made changes to sync_cassan= dra.py file there to include the supercolumn. However looks like that has b= een the issue. I am not doing something right there.=A0

If I want to recreate the keyspace, how is it done? I have the yaml ready.<= /div>

Regards,
Dipti

On Fri, Nov 19, 2010 at 10:23 PM, Jonathan Ellis <jbellis@gmail.com> = wrote:
Twissandra doesn't use supercolumns.

On Fri, Nov 19, 2010 at 10:49 AM, Dipti Mathur <diptidmathur@gmail.com> wrote:
> Hi,
> While trying to insert a new supercolumn into the keyspace, I get the<= br> > following error:
>>>> tweet =3D TWEET.insert('4c540492-efd9-11df-a192-0022fa= 5e3348',{'by':
>>>> {'a':'to'}})
> Traceback (most recent call last):
> =A0=A0File "<stdin>", line 1, in <module>
> =A0=A0File "/home/dipti/src/pycassa/pycassa/columnfamily.py"= , line 689, in
> insert
> =A0=A0 =A0write_consistency_level=3Dwrite_consistency_level)
> =A0=A0File "/home/dipti/src/pycassa/pycassa/columnfamily.py"= , line 711, in
> batch_insert
> =A0=A0 =A0batch.send()
> =A0=A0File "/home/dipti/src/pycassa/pycassa/batch.py", line = 67, in send
> =A0=A0 =A0self.client.batch_mutate(mutations, write_consistency_level)=
> =A0=A0File "/home/dipti/src/pycassa/pycassa/connection.py", = line 228, in
> _client_call
> =A0=A0 =A0return getattr(conn.client, attr)(*args, **kwargs)
> =A0=A0File "/home/dipti/src/pycassa/pycassa/cassandra/Cassandra.p= y", line 803,
> in batch_mutate
> =A0=A0 =A0self.send_batch_mutate(mutation_map, consistency_level)
> =A0=A0File "/home/dipti/src/pycassa/pycassa/cassandra/Cassandra.p= y", line 811,
> in send_batch_mutate
> =A0=A0 =A0args.write(self._oprot)
> =A0=A0File "/home/dipti/src/pycassa/pycassa/cassandra/Cassandra.p= y", line 3984,
> in write
> =A0=A0 =A0oprot.trans.write(fastbinary.encode_binary(self, (self.__cla= ss__,
> self.thrift_spec)))
> TypeError: expected string or Unicode object, dict found
> The keyspace has been constructed as in the Twissandra example.
>
> Regards,
> Dipti



--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

--0016364c7b9fc9a6c604956bd84c--