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

Error on first readchunk with GridOut(_connect=False)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.8
    • Affects Version/s: None
    • Component/s: None
    • None

      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.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: