{"record":{"id":"75b218a0191f82e4","repo":"pathwaycom/pathway","slug":"subject-was-provided-without-schema-registry-se","errorCode":null,"errorMessage":"'subject' was provided without 'schema_registry_settings'. The 'subject' parameter only has an effect when a schema registry is configured; either pass 'schema_registry_settings' or remove 'subject'.","messagePattern":"'subject' was provided without 'schema_registry_settings'\\. The 'subject' parameter only has an effect when a schema registry is configured; either pass 'schema_registry_settings' or remove 'subject'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/io/_utils.py","lineNumber":459,"sourceCode":"        format: str = \"json\",\n        delimiter: str = \",\",\n        key: ColumnReference | None = None,\n        value: ColumnReference | None = None,\n        headers: Iterable[ColumnReference] | None = None,\n        topic_name: ColumnReference | None = None,\n        schema_registry_settings: SchemaRegistrySettings | None = None,\n        subject: str | None = None,\n        allowed_key_types: tuple[dt.DType, ...] | None = (dt.BYTES, dt.STR, dt.ANY),\n        allowed_value_types: tuple[dt.DType, ...] | None = (dt.BYTES, dt.STR, dt.ANY),\n    ) -> MessageQueueOutputFormat:\n        if delimiter != \",\" and format != \"dsv\":\n            raise ValueError(\n                f\"'delimiter' is only meaningful for the 'dsv' format, but \"\n                f\"{format!r} was specified. Drop the 'delimiter' argument \"\n                f\"or use format='dsv'.\"\n            )\n        if subject is not None and schema_registry_settings is None:\n            raise ValueError(\n                \"'subject' was provided without 'schema_registry_settings'. \"\n                \"The 'subject' parameter only has an effect when a schema \"\n                \"registry is configured; either pass 'schema_registry_settings' \"\n                \"or remove 'subject'.\"\n            )\n        if schema_registry_settings is not None and subject is None:\n            raise ValueError(\n                \"'schema_registry_settings' was provided without 'subject'. \"\n                \"When a schema registry is configured, 'subject' must also be \"\n                \"set so the formatter knows which subject to encode under.\"\n            )\n        if subject is not None and not subject:\n            raise ValueError(\n                \"'subject' must be a non-empty string; got an empty string. \"\n                \"Schema Registry subjects identify a named schema version, \"\n                \"and an empty subject is never a valid registry entry.\"\n            )\n        if schema_registry_settings is not None and format != \"json\":","sourceCodeStart":441,"sourceCodeEnd":477,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/io/_utils.py#L441-L477","documentation":"Raised by MessageQueueOutputFormat.build when a Schema Registry 'subject' is given without 'schema_registry_settings'. The subject names which schema version to encode under, and it only has an effect when a registry is actually configured; without registry settings it would be silently ignored, so Pathway rejects the combination up front.","triggerScenarios":"pw.io.kafka.write(table, ..., subject='my-topic-value') with no schema_registry_settings; removing registry settings during a local test run while forgetting the subject argument.","commonSituations":"Testing locally without a Confluent Schema Registry but leaving production's subject parameter in the call; incremental adoption of schema-registry support where settings were never wired up.","solutions":["Pass schema_registry_settings=pw.io.kafka.SchemaRegistrySettings(url=...) together with subject.","Or remove 'subject' if you do not intend to use a schema registry."],"exampleFix":"# before\npw.io.kafka.write(t, ..., subject='orders-value')\n\n# after\npw.io.kafka.write(t, ...,\n    schema_registry_settings=pw.io.kafka.SchemaRegistrySettings(url='http://localhost:8081'),\n    subject='orders-value')","handlingStrategy":"validation","validationCode":"if subject is not None:\n    assert schema_registry_settings is not None, \"subject requires schema_registry_settings\"","typeGuard":null,"tryCatchPattern":"try:\n    pw.io.kafka.write(t, ..., subject=subject)\nexcept ValueError as e:\n    if \"without 'schema_registry_settings'\" in str(e):\n        pw.io.kafka.write(t, ...,\n            schema_registry_settings=pw.io.kafka.SchemaRegistrySettings(url=REGISTRY_URL),\n            subject=subject)\n    else:\n        raise","preventionTips":["Model subject and schema_registry_settings as one optional pair in your config object.","Add a config lint: subject set implies registry settings set."],"tags":["pathway","kafka","schema-registry","output","validation"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}