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/<ipython console> in <module>() /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 <gasol...@gmail.com> 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, <mobiledream...@gmail.com> 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/<ipython console> in <module>() >> >> /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