Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 96093 invoked from network); 19 Jul 2009 23:44:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Jul 2009 23:44:33 -0000 Received: (qmail 92264 invoked by uid 500); 19 Jul 2009 23:45:39 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 92229 invoked by uid 500); 19 Jul 2009 23:45:38 -0000 Mailing-List: contact cassandra-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-user@incubator.apache.org Delivered-To: mailing list cassandra-user@incubator.apache.org Received: (qmail 92220 invoked by uid 99); 19 Jul 2009 23:45:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Jul 2009 23:45:38 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.221.178] (HELO mail-qy0-f178.google.com) (209.85.221.178) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Jul 2009 23:45:27 +0000 Received: by qyk8 with SMTP id 8so1542801qyk.32 for ; Sun, 19 Jul 2009 16:45:06 -0700 (PDT) Received: by 10.224.74.74 with SMTP id t10mr2310263qaj.127.1248047106279; Sun, 19 Jul 2009 16:45:06 -0700 (PDT) Received: from ?10.172.32.111? (h-64-236-138-3.aoltw.net [64.236.138.3]) by mx.google.com with ESMTPS id 26sm2349328qwa.29.2009.07.19.16.45.04 (version=SSLv3 cipher=RC4-MD5); Sun, 19 Jul 2009 16:45:05 -0700 (PDT) Message-Id: <77D4E1C5-49EE-4A19-BFDB-26E08246B013@Holsman.net> From: Ian Holsman To: cassandra-user@incubator.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: New cassandra in trunk - breaks python thrift interface (was AttributeError: 'str' object has no attribute 'write') Date: Mon, 20 Jul 2009 09:45:02 +1000 References: X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org hi mobile. is it possible to put these as JIRA bugs ? instead of just mailing them on the list ? that way people can give them a bit more attention. and other people who have the same issue will be easily see what is going on. the URL is here :- https://issues.apache.org/jira/browse/CASSANDRA regards Ian On 20/07/2009, at 6:36 AM, mobiledreamers@gmail.com wrote: > ok > so which is the version where cassandra python thrift works out of > the box > thanks > > On 7/19/09, Jonathan Ellis wrote: Don't run > trunk if you're not going to read "svn log." > > The api changed with the commit of the 139 patches (and it will change > again with the 185 ones). > > look at interface/cassandra.thrift to see what arguments are expected. > > > On Sun, Jul 19, 2009 at 3:31 PM, wrote: > > Hey Gasol wu > > i regenerated the new thrift interface using > > thrift -gen py cassandra.thrift > > > > > > > > client.insert('Table1', 'tofu', 'Super1:Related:tofu stew', > > pickle.dumps(dict(count=1)), time.time(), 0) > > > --------------------------------------------------------------------------- > > AttributeError Traceback (most recent > call last) > > > > /home/mark/work/cexperiments/ in () > > > > /home/mark/work/common/cassandra/Cassandra.py in insert(self, > table, key, > > column_path, value, timestamp, block_for) > > 358 - block_for > > 359 """ > > --> 360 self.send_insert(table, key, column_path, value, > timestamp, > > block_for) > > 361 self.recv_insert() > > 362 > > > > /home/mark/work/common/cassandra/Cassandra.py in send_insert(self, > table, > > key, column_path, value, timestamp, block_for) > > 370 args.timestamp = timestamp > > 371 args.block_for = block_for > > --> 372 args.write(self._oprot) > > 373 self._oprot.writeMessageEnd() > > 374 self._oprot.trans.flush() > > > > /home/mark/work/common/cassandra/Cassandra.py in write(self, oprot) > > 1923 if self.column_path != None: > > 1924 oprot.writeFieldBegin('column_path', TType.STRUCT, 3) > > -> 1925 self.column_path.write(oprot) > > 1926 oprot.writeFieldEnd() > > 1927 if self.value != None: > > > > AttributeError: 'str' object has no attribute 'write' > > > > > > On Sun, Jul 19, 2009 at 10:29 AM, Gasol Wu > wrote: > >> > >> hi, > >> the cassandra.thrift has changed. > >> u need to generate new python client and compile class again. > >> > >> > >> On Mon, Jul 20, 2009 at 1:18 AM, wrote: > >>> > >>> Hi guys > >>> the new trunk cassandra doesnt work for a simple insert, how do > we get > >>> this working > >>> client.insert('Table1', 'tofu', 'Super1:Related:tofu > >>> stew',pickle.dumps(dict(count=1)), time.time(), 0) > >>> > >>> > --------------------------------------------------------------------------- > >>> AttributeError Traceback (most recent > call > >>> last) > >>> /home/mark/work/cexperiments/ in () > >>> /home/mark/work/common/cassandra/Cassandra.py in insert(self, > table, key, > >>> column_path, value, timestamp, block_for) > >>> 358 - block_for > >>> 359 """ > >>> --> 360 self.send_insert(table, key, column_path, value, > timestamp, > >>> block_for) > >>> 361 self.recv_insert() > >>> 362 > >>> /home/mark/work/common/cassandra/Cassandra.py in > send_insert(self, table, > >>> key, column_path, value, timestamp, block_for) > >>> 370 args.timestamp = timestamp > >>> 371 args.block_for = block_for > >>> --> 372 args.write(self._oprot) > >>> 373 self._oprot.writeMessageEnd() > >>> 374 self._oprot.trans.flush() > >>> /home/mark/work/common/cassandra/Cassandra.py in write(self, > oprot) > >>> 1923 if self.column_path != None: > >>> 1924 oprot.writeFieldBegin('column_path', TType.STRUCT, > 3) > >>> -> 1925 self.column_path.write(oprot) > >>> 1926 oprot.writeFieldEnd() > >>> 1927 if self.value != None: > >>> AttributeError: 'str' object has no attribute 'write' > >>> In [4]: client.insert('Table1', 'tofu', 'Super1:Related:tofu > >>> stew',pickle.dumps(dict(count=1)), time.time(), 0) > >>> > >>> -- > >>> Bidegg worlds best auction site > >>> http://bidegg.com > >> > > > > > > > > -- > > Bidegg worlds best auction site > > http://bidegg.com > > > > > > -- > Bidegg worlds best auction site > http://bidegg.com -- Ian Holsman Ian@Holsman.net