{"record":{"id":"f2731e963994e067","repo":"pathwaycom/pathway","slug":"if-max-difference-is-a-duration-the-values-of-a-c","errorCode":null,"errorMessage":"If max_difference is a Duration, the values of a column must either have a type of DateTimeUtc, DateTimeNaive or Duration. However, the column '{column}' has type '{column_type.typehint}'","messagePattern":"If max_difference is a Duration, the values of a column must either have a type of DateTimeUtc, DateTimeNaive or Duration\\. However, the column '(.+?)' has type '(.+?)'","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/io/_synchronization.py","lineNumber":327,"sourceCode":"\n\ndef _check_column_type(column, max_difference):\n    column_type = column._column.dtype\n    if column_type not in _SUPPORTED_COLUMN_DTYPES:\n        raise ValueError(\n            f\"Fields of type {column_type.typehint} are not supported in connector groups\"\n        )\n    if isinstance(max_difference, int) and column_type != dtype.INT:\n        raise ValueError(\n            \"If max_difference is an integer value, the values of a column must have a type of \"\n            f\"int. However, the column '{column}' has type '{column_type.typehint}'\"\n        )\n    if isinstance(max_difference, datetime.timedelta) and column_type not in (\n        dtype.DATE_TIME_NAIVE,\n        dtype.DATE_TIME_UTC,\n        dtype.DURATION,\n    ):\n        raise ValueError(\n            \"If max_difference is a Duration, the values of a column must either have a type of \"\n            f\"DateTimeUtc, DateTimeNaive or Duration. However, the column '{column}' \"\n            f\"has type '{column_type.typehint}'\"\n        )\n","sourceCodeStart":309,"sourceCodeEnd":332,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/io/_synchronization.py#L309-L332","documentation":"Error \"If max_difference is a Duration, the values of a column must either have a type of DateTimeUtc, DateTimeNaive or Duration. However, the column '{column}' has type '{column_type.typehint}'\" thrown in pathwaycom/pathway.","triggerScenarios":"Thrown at python/pathway/io/_synchronization.py:327 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["When max_difference is a Duration, use a column of type DateTimeUtc, DateTimeNaive or Duration; cast or convert the column to one of these types first."],"exampleFix":"t = t.select(ts=t.ts.strptime(fmt='%Y-%m-%d %H:%M:%S', contains_timezone=False))","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"}