> ## 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-PYCTX-0001: A Python context-manager entry, exit, or entered-value declaration is invalid.

> A Python context-manager entry, exit, or entered-value declaration is invalid.

`SIFR-PYCTX-0001` belongs to the **Embedded Python contexts** diagnostic family. It means: a Python context-manager entry, exit, or entered-value declaration is invalid.

## Why It Happens

A Python context manager entry, exit, suppression, or exception-cause mapping failed the bridge contract.

<Info>
  Use `sifr --explain SIFR-PYCTX-0001` 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-PYCTX-0001`                                                                                               |
| Family                 | `PYCTX`                                                                                                         |
| Severity               | Error                                                                                                           |
| Stability              | stable                                                                                                          |
| Owner                  | `sifr_lowering`                                                                                                 |
| Representative fixture | `crates/sifr_lowering/src/lower/python_interop_tests.rs::invalid_python_context_declaration_reports_pyctx_0001` |

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