{"record":{"id":"ee1f40b2d6306942","repo":"pola-rs/polars","slug":"profile-got-an-unexpected-keyword-argument-k","errorCode":null,"errorMessage":"profile() got an unexpected keyword argument '{k}'","messagePattern":"profile\\(\\) got an unexpected keyword argument '(.+?)'","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/lazyframe/frame.py","lineNumber":2238,"sourceCode":"            self,\n            optimizations=optimizations,\n            background=background,\n            post_opt_callback=post_opt_callback,\n        )\n\n    @overload\n    def collect_async(\n        self,\n        *,\n        gevent: Literal[True],\n        engine: EngineType = \"auto\",\n        optimizations: QueryOptFlags = DEFAULT_QUERY_OPT_FLAGS,\n    ) -> _GeventDataFrameResult[DataFrame]: ...\n\n    @overload\n    def collect_async(\n        self,\n        *,\n        gevent: Literal[False] = False,\n        engine: EngineType = \"auto\",\n        optimizations: QueryOptFlags = DEFAULT_QUERY_OPT_FLAGS,\n    ) -> Awaitable[DataFrame]: ...\n\n    @removed_parameters(\n        RemovedParameter(\n            name=\"streaming\",\n            deprecated_in=\"1.25.0\",\n            removed_in=\"2.0\",\n            hint='Use `engine=\"streaming\"` instead.',\n        )\n    )\n    def collect_async(\n        self,\n        *,\n        gevent: bool = False,\n        engine: EngineType = \"auto\",","sourceCodeStart":2220,"sourceCodeEnd":2256,"githubUrl":"https://github.com/pola-rs/polars/blob/68506541d2de983056c9eb244e1ea05fab377dfc/py-polars/src/polars/lazyframe/frame.py#L2220-L2256","documentation":"LazyFrame.profile() forwards keyword arguments to collect() and rejects unknown ones with this formatted message naming the offending key. Fires when calling profile() with a collect-only or misspelled keyword (e.g. no_optimization vs optimizations) that profile's signature does not accept.","triggerScenarios":"Thrown at py-polars/src/polars/lazyframe/frame.py:2179 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the unexpected keyword argument; check the profile() signature for valid parameters."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"68506541d2de983056c9eb244e1ea05fab377dfc","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}