[ 
https://issues.apache.org/jira/browse/AVRO-3252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17443815#comment-17443815
 ] 

Martin Tzvetanov Grigorov commented on AVRO-3252:
-------------------------------------------------

Recently reported at 
https://github.com/apache/avro/commit/e8c61ba4f0051a76d4bf2e2d4391ec92a6e90f4f#r60209396

> datafile reader fails with BytesIO stream on version 1.11
> ---------------------------------------------------------
>
>                 Key: AVRO-3252
>                 URL: https://issues.apache.org/jira/browse/AVRO-3252
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: python
>         Environment: Windows and Linux
> Python 3.6 to 3.9
> avro==1.11.0
>            Reporter: Florenz Hollebrandse
>            Priority: Major
>
> {code}
> >>> 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'
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to