You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using 2.8.0 I can produce a message with this no issue.
❯ poetry run python src/produce.py
2025-03-12 16:31:27 - Producer - INFO - Record successfully produced to test partition [0] at offset 0
{
"reference": {
"a_string": "foo",
"an_int": 5
}
}
However, after updating to 2.8.2 I get the following error:
❯ poetry run python src/produce.py
Traceback (most recent call last):
File "fastavro/_schema.pyx", line 537, in fastavro._schema._parse_schema_with_repo
File "fastavro/_schema.pyx", line 173, in fastavro._schema.parse_schema
File "fastavro/_schema.pyx", line 407, in fastavro._schema._parse_schema
File "fastavro/_schema.pyx", line 475, in fastavro._schema.parse_field
File "fastavro/_schema.pyx", line 267, in fastavro._schema._parse_schema
fastavro._schema_common.UnknownType: example.MyReference
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "~/src/producer.py", line 75, in _get_serializer
return AvroSerializer(self.schema_registry_client, schema.schema, conf=config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/.venv/lib/python3.11/site-packages/confluent_kafka/schema_registry/avro.py", line 284, in __init__
parsed_schema = self._get_parsed_schema(schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/.venv/lib/python3.11/site-packages/confluent_kafka/schema_registry/avro.py", line 384, in _get_parsed_schema
parsed_schema = parse_schema_with_repo(
^^^^^^^^^^^^^^^^^^^^^^^
File "~/.venv/lib/python3.11/site-packages/confluent_kafka/schema_registry/avro.py", line 631, in parse_schema_with_repo
return load_schema("$root", repo=repo)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "fastavro/_schema.pyx", line 509, in fastavro._schema.load_schema
File "fastavro/_schema.pyx", line 517, in fastavro._schema._load_schema
File "fastavro/_schema.pyx", line 541, in fastavro._schema._parse_schema_with_repo
File "fastavro/_schema.pyx", line 517, in fastavro._schema._load_schema
File "fastavro/_schema.pyx", line 537, in fastavro._schema._parse_schema_with_repo
File "fastavro/_schema.pyx", line 173, in fastavro._schema.parse_schema
File "fastavro/_schema.pyx", line 263, in fastavro._schema._parse_schema
TypeError: argument of type 'NoneType' is not iterable
This seems to be related to the changes that fixed type unions here. #1928
The text was updated successfully, but these errors were encountered:
Upgrading to 2.8.2 for 2.8.0 has resulted in Avro schema references no longer working.
As an example:
registered under the subject
example.MyReference
which is referenced by the schemaregistered under the subject
test-value
The schemas register correctly register. Going to
http://localhost:8085/subjects/test-value/versions/1
givesUsing 2.8.0 I can produce a message with this no issue.
However, after updating to 2.8.2 I get the following error:
This seems to be related to the changes that fixed type unions here. #1928
The text was updated successfully, but these errors were encountered: