# jinja2.exceptions.TemplateNotFound: index.html

- **ID:** `python/flask-template-not-found`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Flask cannot locate the specified template file because it is missing from the templates folder or the folder path is incorrect.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   Ensure the template is at 'templates/index.html' relative to the Flask app root.
   ```
2. **** (70% success)
   ```
   Use render_template_string with inline HTML as a temporary workaround.
   ```

## Dead Ends

- **** — Changing the template folder to an absolute path may break when the app is deployed. (60% fail)
- **** — Creating the template in the wrong directory (e.g., static) does not help. (80% fail)
