Python error using CBTransfer tool

We’re seeing the following error when using the CBTransfer tool to copy data between buckets. We’re currently on Couchbase 4.1 (recently upgaded from 3.1.1). We’re using the following very vanilla set of options. Any ideas what this error means?

cbtransfer.exe -b [sourcebucket] -B [destbucket] http://[cbnode]:8091 http://[cbnode]:8091 -u [admin] -p [password]

Exception in thread s0:] 61.2% (10872100/estimated 17772199 msgs)(5072196/estimated 17772199 msgs)
Traceback (most recent call last):
File “/usr/lib/python2.7/”, line 552, in _bootstrapinner
File “/usr/lib/python2.7/”, line 505, in run*self.args, **self.__kwargs)
File “/opt/couchbase/lib/python/”, line 90, in run
rv, batch, need_backoff = self.scatter_gather(mconns, batch)
File “/opt/couchbase/lib/python/”, line 75, in scatter_gather
File “/opt/couchbase/lib/python/”, line 173, in send_msgs
File “/opt/couchbase/lib/python/”, line 380, in cmd_request
NameError: global name ‘con_res_len’ is not defined

Hi, @eben might be able to help you.


Are you transferring between buckets on the same server, or between two different servers?



Between buckets on the same server.

  • Jeff

Hi again Jeff,

That clearly shouldn’t be happening, and I’m working on reproducing it here so we can verify a fix.

As a work-around, are you able to use cbbackup to back up the original bucket, then cbrestore to restore it to the new bucket?



Thanks for looking into this eben.

As a workaround my developer wrote a small C# program to pump over the visits. That’s working for now, but ideally we’d also like the option to use the built in tools in the future.