{"record":{"id":"8c7dbf6a51a7a865","repo":"pola-rs/polars","slug":"if-table-exists-replace-requires-adbc-versio","errorCode":null,"errorMessage":"`if_table_exists = 'replace'` requires ADBC version >= 0.7, found {driver_manager_str_version}","messagePattern":"`if_table_exists = 'replace'` requires ADBC version >= 0\\.7, found (.+?)","errorType":"exception","errorClass":"ModuleUpgradeRequiredError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/dataframe/frame.py","lineNumber":4529,"sourceCode":"                msg = (\n                    f\"unrecognised connection type {qualified_type_name(connection)!r}\"\n                )\n                raise TypeError(msg)\n\n            driver_manager_str_version = getattr(driver_manager, \"__version__\", \"0.0\")\n            driver_manager_version = parse_version(driver_manager_str_version)\n\n            if if_table_exists == \"fail\":\n                # if the table exists, 'create' will raise an error,\n                # resulting in behaviour equivalent to 'fail'\n                mode = \"create\"\n            elif if_table_exists == \"replace\":\n                if driver_manager_version < (0, 7):\n                    msg = (\n                        \"`if_table_exists = 'replace'` requires ADBC version >= 0.7, \"\n                        f\"found {driver_manager_str_version}\"\n                    )\n                    raise ModuleUpgradeRequiredError(msg)\n                mode = \"replace\"\n            elif if_table_exists == \"append\":\n                # 'append' inserts into an existing table; the table-existence\n                # check below can upgrade this to 'create_append'.\n                mode = \"append\"\n            else:\n                msg = (\n                    f\"unexpected value for `if_table_exists`: {if_table_exists!r}\"\n                    f\"\\n\\nChoose one of {{'fail', 'replace', 'append'}}\"\n                )\n                raise ValueError(msg)\n\n            with (\n                conn if can_close_conn else contextlib.nullcontext(),\n                conn.cursor() as cursor,\n            ):\n                catalog, db_schema, unpacked_table_name = unpack_table_name(table_name)\n                n_rows: int","sourceCodeStart":4511,"sourceCodeEnd":4547,"githubUrl":"https://github.com/pola-rs/polars/blob/df599052daf96e7a9cc30a3b0c6bd25d6947e3c0/py-polars/src/polars/dataframe/frame.py#L4511-L4547","documentation":"Error \"`if_table_exists = 'replace'` requires ADBC version >= 0.7, found {driver_manager_str_version}\" thrown in pola-rs/polars.","triggerScenarios":"Thrown at py-polars/src/polars/dataframe/frame.py:4529 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"df599052daf96e7a9cc30a3b0c6bd25d6947e3c0","analyzedAt":"2026-08-16T12:10:03.978Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}