AttributeError: 'str' object has no attribute 'timestamp' #226

Closed
dvohra opened this Issue Feb 7, 2014 · 3 comments

Projects

None yet

2 participants

@dvohra
dvohra commented Feb 7, 2014

The following generates error AttributeError: 'str' object has no attribute 'timestamp'

from pycassa.batch import *
b = Mutator(pool)
b.insert('TestCF','row1', {'c1':'v1', 'c2':'v2'})
b.insert('TestCF','row2', {'c1':'v1', 'c2':'v2'})
b.send(atomic=True)

dvohra commented Feb 7, 2014

timestamp is an optional attribute.

Owner
thobbs commented Apr 10, 2014

Instead of passing the name of the column family ('TestCF'), you need to pass a ColumnFamily instance: http://pycassa.github.io/pycassa/api/pycassa/batch.html#pycassa.batch.Mutator.insert

@thobbs thobbs closed this Apr 10, 2014
dvohra commented Apr 10, 2014

Thanks thobbs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment