cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Eliott <>
Subject newbie trying to work lazyboy lib
Date Fri, 18 Sep 2009 12:07:51 GMT
I'm still in the WTF stage of cassandra, trying out the lazyboy python  
lib. I'm getting back this error when i try and run the  

 >>> from test1 import record
{'column_family': 'Users', 'keyspace': 'UserData', 'super_column':  
None, 'key': 'd074db72b7a045978e8f0ba048907767'}
User: {'username': 'ieure', 'email': ''}
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/Users/beneliott/Projects/TornadoSites/test/test1/",  
line 77, in <module>           # -> {'username': 'ieure', 'email': ' 
   File "/Users/beneliott/Code/py-packages/tornado-dev/lib/python2.5/ 
site-packages/lazyboy/", line 164, in save
     client.batch_insert(*self._get_batch_args(self.key, changed))
   File "/Users/beneliott/Code/py-packages/tornado-dev/lib/python2.5/ 
site-packages/lazyboy/", line 106, in func
     raise ErrorThriftMessage(message)
lazyboy.exceptions.ErrorThriftMessage: Invalid method name:  

Looking at the save method in the Record object I can see that the  
object called 'client' returned by_get_cas doesn't have a batch_insert  
method... which is probably what's throwing the exception:

client = self._get_cas()

(deleted, changed) = self._marshal().values()

for path in deleted:
        client.remove(self.key.keyspace, self.key.key, path,
                     self.timestamp(), ConsistencyLevel.ONE)

if changed:
        client.batch_insert(*self._get_batch_args(self.key, changed))

However, the object which is returned by self._get_cas() though does  
have a method _get_server(). If I call this  then it does return  
another object which does have batch_insert method.

Maybe somehow self._get_cas() is returning the wrong object somehow.  
Maybe i need to tweak a setting?

Any advice would be great.



View raw message