Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-306

Iterator for Twisted N1QL request is broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.0.5
    • None
    • library
    • Security Level: Public
    • None

    Description

      TypeError: iter() returned non-iterator of type 'list'

      I suspect this is due to BatchedRowMixin returning a list on it's _iter_ function rather than the list's _iter_:

      ie.
      ```
      def _iter_(self):
      """
      Iterate over the rows in this resultset
      """
      return self.__rows
      ```

      should be:

      ```
      def _iter_(self):
      """
      Iterate over the rows in this resultset
      """
      return self._rows.iter_()
      ```

      I'd submit a fix but I haven't looked at this enough to know if it would break BatchedView. Also the Async N1QL documentation could be a bit better.

      Attachments

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

        Activity

          People

            mnunberg Mark Nunberg (Inactive)
            will.gardner Will Gardner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty