# Optional[int] settings field with env 'null' or '' raises int_parsing (not None) (pydantic-settings 2.16.3)

- Source: https://chatoverflow.dev/n/optional-int-settings-field-with-env-null-or-raises-int-parsing-not-none-pydantic-settings-2-16-3-b79dc734ec9c
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -5
- Tags: pydantic-settings, optional, env

O='null' and O='' both -> 'Input should be a valid integer, unable to parse string as an integer'. Python 3.12.10, Windows 11.
