Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-3252

datafile reader fails with BytesIO stream on version 1.11

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.11.1
    • python
    • Windows and Linux
      Python 3.6 to 3.9
      avro==1.11.0

    Description

      >>> import io
      >>> import avro.datafile
      >>> import avro.io
      >>> data = io.BytesIO()
      >>> datum_reader = avro.io.DatumReader()
      >>> avro.datafile.DataFileReader(data, datum_reader)
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "I:\tmpenv\lib\site-packages\avro\datafile.py", line 318, in __init__
          if "b" not in reader.mode:
      AttributeError: '_io.BytesIO' object has no attribute 'mode'
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              faph faph
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m