Uploaded image for project: 'Couchbase Kubernetes'
  1. Couchbase Kubernetes
  2. K8S-548

cbtransfer error: AttributeError: 'module' object has no attribute 'loads'

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Fix
    • Major
    • None
    • None
    • couchbase-server

    Description

      Summary: Error message when running cbtransfer. Couchbase Server 5.0 running on Ubuntu.

      Repro:

      1. Create bucket called metrics-metadata
      2. Put at least one document in the bucket (see example below, the exact document may not matter)
      3. Use cbtransfer to export to csv with the command: ./cbtransfer -b metrics-metadata --key=metrics\.content_partner:.* -u Administrator -p password http://localhost:8091 /mnt/storage/content_partner.csv

      Expected:

      CSV file should be created.

      Actual:

      Error message: 

      {{ Traceback (most recent call last): File "/opt/couchbase/lib/python/cbtransfer", line 33, in <module> pump_transfer.exit_handler(pump_transfer.Transfer().main(sys.argv)) File "/opt/couchbase/lib/python/pump_transfer.py", line 80, in main rv = pumpStation.run() File "/opt/couchbase/lib/python/pump.py", line 112, in run rv, source_map, sink_map = self.check_endpoints() File "/opt/couchbase/lib/python/pump.py", line 167, in check_endpoints rv, source_map = self.source_class.check(self.opts, self.source_spec) File "/opt/couchbase/lib/python/pump_dcp.py", line 73, in check err, map = pump.rest_couchbase(opts, spec) File "/opt/couchbase/lib/python/pump.py", line 1025, in rest_couchbase result, errors = rest.list_buckets(True) File "/opt/couchbase/lib/python/cluster_manager.py", line 671, in list_buckets result, errors = self._get(url) File "/opt/couchbase/lib/python/cluster_manager.py", line 32, in g return f(*args, **kwargs) File "/opt/couchbase/lib/python/cluster_manager.py", line 1260, in _get return _handle_response(response, self.debug) File "/opt/couchbase/lib/python/cluster_manager.py", line 1320, in _handle_response return response.json(), None File "/opt/couchbase/lib/python/requests/models.py", line 799, in json return complexjson.loads( AttributeError: 'module' object has no attribute 'loads'}}

      Notes:

      I tried this with 5.5 on Windows and it seemed to work correctly (no error message). This may be a Linux-only issue or it maybe a 5.0 issue (link to original forum post in comments).

      Sample document:

      Key: metrics.content_partner:4K MEDIA

      {{{ "akamaiCpCode": "81845", "platformCpId": 50000369, "metadata-key": "4K MEDIA", "ingestDirectory": "4kmedia", "companyName": "4K MEDIA INC.", "supplierNumber": "3338", "revSharePercent": -0.01, "buybackRevSharePercent": -0.01, "contentPartnerName": "NS CP 4K Media", "cpIdentifier": "4K Media", "revCalculationType": 0, "contentPartnerId": 650, "holdMusicLicenseFee": 0, "asperaPassword": "ABCPASSWORD", "metadata-type": "metrics.content_partner", "isDeleted": 0, "allowBuyback": 0, "parentContentPartnerName": "Third Party", "firstRelease": "2013-02-28 00:00:00.0", "status": 0 }}}

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mikew Mike Wiederhold [X] (Inactive)
            matthew.groves Matthew Groves
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty