Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.2.0
    • Component/s: library
    • Security Level: Public
    • Labels:
    • Environment:
      Ubuntu 13.10 or OS X 10.8.5 both using CB v2.2.0.

      Description

      Gentlefolk,

      The following method worked under Python Client SDK v1.0.0.

      def by_timestamp_and_text_and_text(cb, timestamp, period):

      q = Query()

      q.stale = STALE_UPDATE_BEFORE
      q.mapkey_range = [[timestamp, 'A', 'a'], [timestamp + period, q.STRING_RANGE_END, q.STRING_RANGE_END]]
      q.inclusive_end = False
      q.reduce = False

      results = cb.query("a_design_document", "by_timestamp_and_text_and_text", include_docs=False, query=q)

      return results

        1. by_timestamp_and_text_and_text()

      It is looking for keys of the form: [(int)timestamp, (str)allCapsText, (str)text]

      Using the Python client SDK v 1.1.0, it throws the following error:

      HttpResult<RC=0x0, Value={'reason': 'invalid UTF-8 JSON: error,{9,"lexical error: invalid char in json text.\\n",\n <<"

      {\\"keys\\":None}

      ">>}', 'error': 'bad_request'}, HTTP=400

      Here's the query string throwing the above:

      reduce=false&endkey=%5B1381122000%2C%20%22%5Cu0fff%22%2C%20%22%5Cu0fff%22%5D&startkey=%5B1381118400%2C%20%22A%22%2C%20%22a%22%5D&stale=false&inclusive_end=false

      Here it is URL decoded:

      reduce=false&endkey=[1381122000, "\u0fff", "\u0fff"]&startkey=[1381118400, "A", "a"]&stale=false&inclusive_end=false

      An important query in my app no longer functions. Any suggested work arounds?

      Anon,
      Andrew

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

        Activity

        Hide
        mnunberg Mark Nunberg added a comment -

        See https://github.com/couchbase/couchbase-python-client/commit/0f400567a7f5e83d5da35347a4b9fb2684128f1c for a fix. This will be bundled with the next release

        Tell me if this fixes your issue

        Show
        mnunberg Mark Nunberg added a comment - See https://github.com/couchbase/couchbase-python-client/commit/0f400567a7f5e83d5da35347a4b9fb2684128f1c for a fix. This will be bundled with the next release Tell me if this fixes your issue
        Hide
        adonoho adonoho added a comment -

        Mark,

        Yes, this fixes the issue on both OS X and Ubuntu.

        Thank you.

        Anon,
        Andrew

        Show
        adonoho adonoho added a comment - Mark, Yes, this fixes the issue on both OS X and Ubuntu. Thank you. Anon, Andrew
        Hide
        larry Larry Liu added a comment -

        Hi, Mark

        Is this gonna available in next release?

        Larry

        Show
        larry Larry Liu added a comment - Hi, Mark Is this gonna available in next release? Larry

          People

          • Assignee:
            mnunberg Mark Nunberg
            Reporter:
            adonoho adonoho
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes