GridFsBucket.download_to_stream raises TypeError

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.2.1
    • Affects Version/s: 3.1, 3.1.1, 3.2
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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 (Inactive)
              Reporter:
              Anna Herlihy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: