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

GridFsBucket.download_to_stream raises TypeError

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.1
    • Affects Version/s: 3.1, 3.1.1, 3.2
    • Component/s: None
    • None

      Repro:

      bucket.upload_from_stream('tester', "hello! this is data")
      with open('tester.txt', 'w') as file:
          bucket.download_to_stream_by_name('tester', file)
      
      Traceback (most recent call last):
        File "<stdin>", line 2, in <module>
        File "gridfs/__init__.py", line 691, in download_to_stream_by_name
          destination.write(gout)
      TypeError: expected a character buffer object
      
      

            Assignee:
            anna.herlihy@mongodb.com Anna Herlihy (Inactive)
            Reporter:
            anna.herlihy@mongodb.com Anna Herlihy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: