Home > Blockchain >  Throws AvroTypeException error while creating AVRO files with data containing date
Throws AvroTypeException error while creating AVRO files with data containing date

Time:10-26

When I was trying to create an AVRO file with data containing a date object, it throws an AvroTypeException error.

This is the schema I have used: screen shot of schema

This is the code-bit writing the data: screen shot of code-bit

This is the error shown while running the code: screen shot of error

Please find the link here to full version of my code I have tried.

NOTE: Python version: 3.7.10, avro-python3 version 1.10.2

Any help or suggestions are appreciated.

CodePudding user response:

avro-python3 never supported logical types and was abandoned in favor of having the avro library support both Python 2 and 3 (and now it only supports Python 3).

To fix the problem you should pip uninstall avro-python3 and pip install avro.

  • Related