{"record":{"id":"e4600097385b523d","repo":"pathwaycom/pathway","slug":"at-least-one-of-the-parameters-duration-ratio-s","errorCode":null,"errorMessage":"At least one of the parameters [duration, ratio] should be provided.","messagePattern":"At least one of the parameters \\[duration, ratio\\] should be provided\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/stdlib/temporal/_window.py","lineNumber":625,"sourceCode":"    ...   pw.this._pw_window_start,\n    ...   pw.this._pw_window_end,\n    ...   min_t=pw.reducers.min(pw.this.t),\n    ...   max_t=pw.reducers.max(pw.this.t),\n    ...   count=pw.reducers.count(),\n    ... )\n    >>> pw.debug.compute_and_print(result, include_id=False)\n    _pw_instance | _pw_window_start | _pw_window_end | min_t | max_t | count\n    0            | 3                | 13             | 12    | 12    | 1\n    0            | 6                | 16             | 12    | 15    | 4\n    0            | 9                | 19             | 12    | 17    | 6\n    0            | 12               | 22             | 12    | 17    | 6\n    0            | 15               | 25             | 15    | 17    | 3\n    1            | 3                | 13             | 10    | 11    | 2\n    1            | 6                | 16             | 10    | 11    | 2\n    1            | 9                | 19             | 10    | 11    | 2\n    \"\"\"\n    if duration is None and ratio is None:\n        raise ValueError(\n            \"At least one of the parameters [duration, ratio] should be provided.\"\n        )\n    elif duration is not None and ratio is not None:\n        raise ValueError(\"Cannot provide both [duration, ratio] at the same time.\")\n\n    return _SlidingWindow(\n        duration=duration,\n        hop=hop,\n        ratio=ratio,\n        origin=origin,\n    )\n\n\n@check_arg_types\n@trace_user_frame\ndef tumbling(\n    duration: int | float | datetime.timedelta,\n    origin: int | float | datetime.datetime | None = None,","sourceCodeStart":607,"sourceCodeEnd":643,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/stdlib/temporal/_window.py#L607-L643","documentation":"Error \"At least one of the parameters [duration, ratio] should be provided.\" thrown in pathwaycom/pathway.","triggerScenarios":"Thrown at python/pathway/stdlib/temporal/_window.py:625 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide exactly one of duration or ratio."],"exampleFix":"pw.temporal.sliding(duration=timedelta(hours=1))","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-15T17:31:12.345Z"}