{"record":{"id":"9d58d093cea7fd99","repo":"pola-rs/polars","slug":"unrecognised-frame-type-qualified-type-name-obj","errorCode":null,"errorMessage":"unrecognised frame type: {qualified_type_name(obj)}","messagePattern":"unrecognised frame type: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/sql/context.py","lineNumber":77,"sourceCode":"\n\ndef _ensure_lazyframe(obj: Any) -> LazyFrame:\n    \"\"\"Return LazyFrame from compatible input.\"\"\"\n    if isinstance(obj, (DataFrame, LazyFrame)):\n        return obj.lazy()\n    elif isinstance(obj, Series):\n        return obj.to_frame().lazy()\n    elif _check_for_pandas(obj) and isinstance(obj, (pd.DataFrame, pd.Series)):\n        if isinstance(frame := from_pandas(obj), Series):\n            frame = frame.to_frame()\n        return frame.lazy()\n    elif is_pycapsule(obj) or (\n        _check_for_pyarrow(obj) and isinstance(obj, (pa.Table, pa.RecordBatch))\n    ):\n        return DataFrame(obj).lazy()  # type: ignore[union-attr]\n    else:\n        msg = f\"unrecognised frame type: {qualified_type_name(obj)}\"\n        raise ValueError(msg)\n\n\ndef _get_frame_locals(\n    *,\n    all_compatible: bool,\n    n_objects: int | None = None,\n    named: str | Collection[str] | Callable[[str], bool] | None = None,\n) -> dict[str, Any]:\n    \"\"\"Return compatible frame objects from the local stack.\"\"\"\n    of_type = _compatible_frame if all_compatible else (DataFrame, LazyFrame, Series)\n    return _get_stack_locals(of_type=of_type, n_objects=n_objects, named=named)  # type: ignore[arg-type]\n\n\nclass SQLContext(Generic[FrameType]):\n    \"\"\"\n    Run SQL queries against DataFrame, LazyFrame, and Series data.\n\n    .. warning::","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/pola-rs/polars/blob/5d8ebabf11caea54a5c29178a64a058762f49766/py-polars/src/polars/sql/context.py#L59-L95","documentation":"_ensure_lazyframe in the SQL context only accepts DataFrame, LazyFrame, Series, pandas DataFrame/Series, PyCapsule, or pyarrow Table/RecordBatch; any other registered object type reaches the terminal guard and raises with its qualified type name. Means you registered/framed an unsupported object in a SQL context.","triggerScenarios":"Thrown at py-polars/src/polars/sql/context.py:77 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Register objects of a recognised frame type (DataFrame, LazyFrame, or a SQLContext-compatible mapping); convert the object before registering."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5d8ebabf11caea54a5c29178a64a058762f49766","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}