diff --git a/src/mlx/warnings/warnings.py b/src/mlx/warnings/warnings.py index 35961afd..1c2ca7f5 100644 --- a/src/mlx/warnings/warnings.py +++ b/src/mlx/warnings/warnings.py @@ -38,7 +38,8 @@ def substitute_envvar(checker_config, keys): try: checker_config[key] = template_obj.substitute(os.environ) except KeyError as err: - raise WarningsConfigError(f"Failed to find environment variable {err}") from None + raise WarningsConfigError(f"Failed to find environment variable {err} for configuration value {key!r}")\ + from None class WarningsPlugin: