Closed macintux closed 10 years ago
>>> import riak >>> client = riak.RiakClient(pbc_port = 10017) >>> client.ping() True >>> sbt = client.bucket_type('set_bucket') >>> sbt.get_buckets() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "riak/bucket.py", line 640, in get_buckets return self._client.get_buckets(bucket_type=self, timeout=timeout) File "riak/client/transport.py", line 184, in wrapper return self._with_retries(pool, thunk) File "riak/client/transport.py", line 126, in _with_retries return fn(transport) File "riak/client/transport.py", line 182, in thunk return fn(self, transport, *args, **kwargs) File "riak/client/operations.py", line 63, in get_buckets timeout=timeout)] File "riak/transports/http/transport.py", line 218, in get_buckets raise RiakError('Error getting buckets.') riak.RiakError: 'Error getting buckets.' >>> sbt.get_property("n_val", "foo") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "riak/bucket.py", line 585, in get_property return self.get_properties()[key] File "riak/bucket.py", line 604, in get_properties return self._client.get_bucket_type_props(self) File "riak/client/transport.py", line 184, in wrapper return self._with_retries(pool, thunk) File "riak/client/transport.py", line 126, in _with_retries return fn(transport) File "riak/client/transport.py", line 182, in thunk return fn(self, transport, *args, **kwargs) File "riak/client/operations.py", line 265, in get_bucket_type_props return transport.get_bucket_type_props(bucket_type) File "riak/transports/http/transport.py", line 303, in get_bucket_type_props raise RiakError('Error getting bucket-type properties.') riak.RiakError: 'Error getting bucket-type properties.'
Note that the get_property method currently requires a bogus "value" argument, hence the extra argument. Separate issue will be filed on that.
get_property
To demonstrate that the client is working for non-bt stuff:
>>> client.bucket('foo').new('key', data=42).store() <riak.riak_object.RiakObject object at 0x104295590>
Closing bogus issue
Note that the
get_property
method currently requires a bogus "value" argument, hence the extra argument. Separate issue will be filed on that.To demonstrate that the client is working for non-bt stuff: