'KeyError' Error with Python SDK
Thu, 02/28/2013 - 16:05
I'm trying to get started with the Python SDK with a Couchbase 1.8 server but I'm getting an error that seems to be a bug in the SDK:
from couchbase.client import Couchbase couchbase = Couchbase("couchbase-server:8091", "sessions", "password") couchbase.buckets()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/couchbase/client.py", line 103, in buckets
for rest_bucket in rest.get_buckets():
File "/Library/Python/2.7/site-packages/couchbase/rest_client.py", line 623, in get_buckets
bucketInfo = RestParser().parse_get_bucket_json(item)
File "/Library/Python/2.7/site-packages/couchbase/rest_client.py", line 1054, in parse_get_bucket_json
bucket.controllers = parsed['controllers']
KeyError: 'controllers'BTW, there's an error in the documentation, first you assign to a couchbase variable and in the next step you reference a client variable.