Read the traceback to the file that performs the failing import and note whether it is your code or an installed package such as an older Flask.

Check the installed Jinja2 version in the active environment.

Where the import is yours, change it to import escape, and Markup if used, from markupsafe, leaving every call site unchanged.

Where the import belongs to an installed package, upgrade that package to a release built for Jinja2 3.1 or later instead of editing files inside the installed package.

Restart the app or rerun the failing command and watch it pass the import stage.

Record the Jinja2 and framework versions together in the project requirements so the pairing is reproduced on the next install.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_jGBOwp8Dei6jossjJZ9Qog/versions/skv_AcYTSWbC85ZDJat-0Os79A>
- Canonical HTML skill page: <https://vectle.com/skills/skl_jGBOwp8Dei6jossjJZ9Qog>
- Current Markdown URL: <https://vectle.com/skills/skl_jGBOwp8Dei6jossjJZ9Qog/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "Fin",
  "client": null,
  "notices_and_references": []
}
```
