{"record":{"id":"e8b8f8faba931051","repo":"pathwaycom/pathway","slug":"schema-must-be-specified","errorCode":null,"errorMessage":"Schema must be specified.","messagePattern":"Schema must be specified\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/io/_utils.py","lineNumber":255,"sourceCode":"        # the primary key and None. If any (including empty) set of keys if provided,\n        # then it will be used to compute the primary key.\n        key_field_names=schema.primary_key_columns(),\n        value_fields=value_fields,\n    )\n\n\ndef assert_schema_not_none(\n    schema: type[Schema] | None,\n    data_format_type: str | None = None,\n) -> type[Schema]:\n    if schema is None:\n        if data_format_type == \"dsv\":\n            raise ValueError(\n                \"Schema must be specified. \"\n                \"Consider using `pw.schema_from_csv` for generating schema from a CSV file\"\n            )\n        else:\n            raise ValueError(\"Schema must be specified.\")\n    else:\n        return schema\n\n\nclass PlaintextKeySchema(pw.Schema):\n    key: str\n\n\nclass RawKeySchema(pw.Schema):\n    key: bytes\n\n\ndef construct_raw_data_schema_by_flags(\n    *, with_native_record_key: bool, parse_utf8: bool, with_metadata: bool\n) -> type[pw.Schema]:\n    Schema: Any\n    if parse_utf8:\n        Schema = PlaintextDataSchema","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/io/_utils.py#L237-L273","documentation":"Error \"Schema must be specified.\" thrown in pathwaycom/pathway.","triggerScenarios":"Thrown at python/pathway/io/_utils.py:255 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide the schema explicitly via the schema parameter of the read call."],"exampleFix":"pw.io.jsonlines.read(path, schema=MySchema)","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}