pluralsight / spavro

Spavro is a (sp)eedier avro library -- Spavro is a fork of the official Apache AVRO python 2 implementation with the goal of greatly improving data read deserialization and write serialization performance.
Apache License 2.0
26 stars 15 forks source link

Issue #3 replicated in Spavro 1.1.15 #4

Closed shawnsarwar closed 6 years ago

shawnsarwar commented 6 years ago

I'm able to replicate issue #3 running spavro 1.1.15. I'm running it in pipenv so I'm pretty sure I don't have an out-dated dependency. The only apparent thing that's changed is the line number of the throwing error.

For reproduction, please use the artifact in the original issue.

from Pipfile.lock

        "spavro": {
            "hashes": [
                "sha256:25e2994564df461baf739d2825e2451d5875de5583d0ed8c92070738661a6f4a"
            ],
            "version": "==1.1.15"
        }

TB:

Traceback (most recent call last):
  File "src/spavro/fast_binary.pyx", line 705, in spavro.fast_binary.get_writer
  File "src/spavro/fast_binary.pyx", line 499, in spavro.fast_binary.make_union_writer
  File "src/spavro/fast_binary.pyx", line 363, in spavro.fast_binary.get_check
  File "src/spavro/fast_binary.pyx", line 367, in spavro.fast_binary.make_record_check
  File "src/spavro/fast_binary.pyx", line 363, in spavro.fast_binary.get_check
  File "src/spavro/fast_binary.pyx", line 411, in spavro.fast_binary.make_union_check
  File "src/spavro/fast_binary.pyx", line 363, in spavro.fast_binary.get_check
KeyError: 'org.eha.demo.parents'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./test.py", line 68, in <module>
    test(obj, schema)
  File "./test.py", line 42, in t2
    with DataFileWriter(bytes_writer, DatumWriter(), avsc, codec='deflate') as writer:
  File "/home/sarwar/.local/share/virtualenvs/avro-check-in6pzLTy/lib/python3.5/site-packages/spavro/datafile.py", line 99, in __init__
    self.datum_writer.writers_schema = writers_schema
  File "/home/sarwar/.local/share/virtualenvs/avro-check-in6pzLTy/lib/python3.5/site-packages/spavro/io.py", line 820, in writers_schema
    self.write_datum = get_writer(parsed_writer_schema.to_json())
  File "src/spavro/fast_binary.pyx", line 709, in spavro.fast_binary.get_writer
KeyError: 'union'
shawnsarwar commented 6 years ago

Closed due to reopening of #3