Python: More problems with counters

Alex De la rosa at
Sun Aug 17 13:33:34 EDT 2014

Hi there,

I was able to install the latest python client version with "pip install
riak==2.1.0rc1", however, counters still fails to work... I used the
following code ( that is the same as in the documentation ):

bucket = client.bucket_type('counter_bucket').bucket('likes')

however I get the following error:

Traceback (most recent call last):
  File "", line 18, in <module>
    counter ='Barcelona')
  File "/usr/local/lib/python2.7/dist-packages/riak/", line 159,
in new
    if self.bucket_type.datatype:
  File "/usr/local/lib/python2.7/dist-packages/riak/", line 78, in
    value = self.fget(obj)
  File "/usr/local/lib/python2.7/dist-packages/riak/", line 618,
in datatype
    return self.get_properties().get('datatype')
  File "/usr/local/lib/python2.7/dist-packages/riak/", line 557,
in get_properties
    return self._client.get_bucket_type_props(self)
  File "/usr/local/lib/python2.7/dist-packages/riak/client/",
line 184, in wrapper
    return self._with_retries(pool, thunk)
  File "/usr/local/lib/python2.7/dist-packages/riak/client/",
line 126, in _with_retries
    return fn(transport)
  File "/usr/local/lib/python2.7/dist-packages/riak/client/",
line 182, in thunk
    return fn(self, transport, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/riak/client/",
line 265, in get_bucket_type_props
    return transport.get_bucket_type_props(bucket_type)
line 381, in get_bucket_type_props
line 50, in _request
    return self._recv_msg(expect)
line 142, in _recv_msg
    raise RiakError(err.errmsg)
riak.RiakError: 'Invalid bucket type: <<"counter_bucket">>'

It says the bucket type is wrong (but is the same as in the
documentation)... I tried other combinations and all of them failed too:

riak.RiakError: 'Invalid bucket type: <<"counters_bucket">>'
riak.RiakError: 'Invalid bucket type: <<"counters">>'
riak.RiakError: 'Invalid bucket type: <<"counter">>'

so... no plural, no singular, not isolated... which is the correct
"bucket_type" to use then??

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list