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

Hudson commented on AVRO-2432:
------------------------------

SUCCESS: Integrated in Jenkins build AvroJava #758 (See 
[https://builds.apache.org/job/AvroJava/758/])
AVRO-2432: Handle Empty Datafiles (#691) (github: 
[https://github.com/apache/avro/commit/7d87cde06253913e9ef23c671e9ce092bc35dfe3])
* (edit) lang/py/test/test_datafile.py
* (edit) lang/py3/avro/datafile.py
* (edit) lang/py3/avro/tests/test_datafile.py
* (edit) lang/py/src/avro/datafile.py


> Python 3: AssertionError on reading "empty" file
> ------------------------------------------------
>
>                 Key: AVRO-2432
>                 URL: https://issues.apache.org/jira/browse/AVRO-2432
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: python
>    Affects Versions: 1.9.0
>            Reporter: David Beswick
>            Assignee: Michael A. Smith
>            Priority: Minor
>             Fix For: 1.10.0
>
>         Attachments: 28.avro, patch-avro-2432.patch
>
>
> I've seen this problem with the pip package avro-python3. An AssertionError 
> is thrown on reading certain unusual files.
> Problematic files seem to have these characteristics:
> * The file is read without issue by avro-tools
> * Normal, correct header with sync token
> * Zero records (first block_count read is zero)
> * A sync token follows the zero block_count long, then EOF
> An example file is attached.
> Repro code (nothing special):
> {code:python}
> from avro.datafile import DataFileReader
> from avro.io import DatumReader
> with DataFileReader(open("28.avro", 'rb'), DatumReader()) as r:
>     for rec in r:
>         print(rec)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to