Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-782

Error on first readchunk with GridOut(_connect=False)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8
    • Component/s: None
    • Labels:
      None

      Description

      Bug in unreleased code, a result of the fix for PYTHON-749:

      >>> g = GridOut(db.fs, f._id, _connect=False)
      >>> g.readchunk()
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "gridfs/grid_file.py", line 446, in readchunk
          chunk_size = int(self.chunk_size)
        File "gridfs/grid_file.py", line 438, in __getattr__
          raise AttributeError("GridOut object has no attribute '%s'" % name)
      AttributeError: GridOut object has no attribute 'chunk_size'

      The GridOut instance can now access its "chunk_size" before it has connected, but "chunk_size" is not yet set.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: