How do I disconnect a gcouchbase.bucket.Bucket

Now I got an error like:

site-packages/gcouchbase/", line 86, in timer_event_factory return GEventTimer() TypeError: 'NoneType' object is not callable

I suspect it is related to disconnect.

I’d be interested in reproducing this error. Can you show me the script which caused this? Also, ensure you are running on the latest version of the Python SDK (2.0.7). This fix may be relevant (and is in 2.0.7):

Also, it seems you’re using the deprecated 0.x version of gevent. You may wish to upgrade to the 1.x series.

Thank you for the quick reply. Pretty hard to reproduce. A simple script works well, but somehow not when mixed in a larger project. From your reply and documents, also I haven’t read it, but looks I don’t need to explicitly call “disconnect” or “close” somehow, am I right?


Yes, it should normally be sufficient to simply let the Bucket object fall out of reference. In practice however you may have situations where you have things like circular references which would prevent the Bucket from actually being destroyed. Let me know if you’re running into this.