Description
The Example code for Twisted API provided at https://pypi.org/project/couchbase/3.0.9/ runs with an error:
$ python3.9 demo.py |
Traceback (most recent call last):
|
File "/Users/yuvrajkanwar/PycharmProjects/demo308/venv/demo.py", line 9, in <module> |
cluster = TxCluster('couchbase://10.112.206.101', ClusterOptions(PasswordAuthenticator('Administrator', 'password'))) |
File "/usr/local/lib/python3.9/site-packages/txcouchbase/cluster.py", line 582, in __init__ |
super(TxCluster, self).__init__(*args, bucket_factory=kwargs.pop('bucket_factory', TxBucket), **kwargs) |
File "/usr/local/lib/python3.9/site-packages/txcouchbase/cluster.py", line 353, in __init__ |
super(TxDeferredClientMixin, self).__init__(*args, **kwargs) |
File "/usr/local/lib/python3.9/site-packages/txcouchbase/cluster.py", line 464, in __init__ |
super(TxRawCluster, self).__init__(*args, bucket_factory=kwargs.pop('bucket_factory', TxRawBucket), **kwargs) |
TypeError: __init__() takes from 1 to 2 positional arguments but 3 were given |
In fact, in the original form, it won't even compile as that code seems to be using `couchbase.cluster.ClusterOptions` and `couchbase.cluster.PasswordAuthenticator` which is not part of imports.
We should provide a better example code for this documentation.