> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sifr.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# SIFR-PYRES-0002: A Python resource declaration uses an unsupported ownership or target shape.

> A Python resource declaration uses an unsupported ownership or target shape.

`SIFR-PYRES-0002` belongs to the **Embedded Python resources** diagnostic family. It means: a Python resource declaration uses an unsupported ownership or target shape.

## Why It Happens

Python resource cleanup or lifetime rules were violated. Ensure owned Python resources are closed or transferred on every path.

<Info>
  Use `sifr --explain SIFR-PYRES-0002` locally to see the renderer's exact message template and any machine-applicable suggestions for the compiler version you are running.
</Info>

## Details

| Field                  | Value                                                                                                               |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------- |
| Code                   | `SIFR-PYRES-0002`                                                                                                   |
| Family                 | `PYRES`                                                                                                             |
| Severity               | Error                                                                                                               |
| Stability              | stable                                                                                                              |
| Owner                  | `sifr_lowering`                                                                                                     |
| Representative fixture | `crates/sifr_lowering/src/lower/python_interop_validation_tests.rs::bridge_opaque_target_is_terminally_unsupported` |

See the [Error Codes index](/diagnostics/error-codes) for the complete catalog.
