NousResearch/hermes-agent · warning · BlueprintFillError
invalid time {time_val!r} — use HH:MM (24h)
Error message
invalid time {time_val!r} — use HH:MM (24h) What it means
BlueprintFillError: a `time` value was supplied but it does not match _TIME_RE (defined at cron/blueprint_catalog.py:682 as ^([01]?\d|2[0-3]):([0-5]\d)$). Only strict 24h HH:MM with hours 0-23 and minutes 00-59 is accepted; '9am', '9:5', '25:00', and '09:30pm' all fail.
Source
Thrown at cron/blueprint_catalog.py:706
def _resolve_schedule(blueprint: AutomationBlueprint, values: Dict[str, Any]) -> str:
"""Fill the schedule_template placeholders from resolved slot values."""
sched = blueprint.schedule_template
# A free-text `schedule` slot passes through verbatim (full flexibility).
if "schedule" in values and values["schedule"]:
return str(values["schedule"])
repl: Dict[str, str] = {}
# time -> minute/hour
time_val = values.get("time")
if "{minute}" in sched or "{hour}" in sched:
if not time_val:
raise BlueprintFillError("a time is required")
m = _TIME_RE.match(str(time_val).strip())
if not m:
raise BlueprintFillError(f"invalid time {time_val!r} — use HH:MM (24h)")
repl["hour"] = str(int(m.group(1)))
repl["minute"] = str(int(m.group(2)))
# weekday set -> dow
if "{dow}" in sched:
if "recurrence" in values:
preset = str(values.get("recurrence", "everyday")).lower()
if preset not in WEEKDAY_PRESETS:
raise BlueprintFillError(
f"unknown recurrence {preset!r} — one of {', '.join(WEEKDAY_PRESETS)}"
)
repl["dow"] = WEEKDAY_PRESETS[preset]
elif "day" in values:
day = str(values.get("day", "")).lower()
if day not in _DAY_TO_DOW:
raise BlueprintFillError(f"unknown day {day!r}")
repl["dow"] = _DAY_TO_DOW[day]
else:View on GitHub (pinned to c896c09c42)
Solutions
- Use zero-optional hours but two-digit minutes in 24h: '09:30', '9:30', '00:00'
- Convert 12-hour input before submitting: 7pm -> '19:00'
- Pre-validate with the same regex: re.match(r'^([01]?\d|2[0-3]):([0-5]\d)$', t)
Example fix
# before
fill_blueprint(bp, {"time": "7:30pm"})
# BlueprintFillError: invalid time '7:30pm' — use HH:MM (24h)
# after
fill_blueprint(bp, {"time": "19:30"}) Defensive patterns
Strategy: validation
Validate before calling
import re
from cron.blueprint_catalog import _TIME_RE
def valid_time(t: str) -> bool:
return bool(_TIME_RE.match(t.strip())) Try / catch
try:
spec = fill_blueprint(bp, values)
except BlueprintFillError as e:
if str(e).startswith("invalid time"):
values["time"] = normalize_to_24h(values["time"]) # parse '7pm' -> '19:00'
spec = fill_blueprint(bp, values)
else:
raise Prevention
- Normalize user time input to 24h HH:MM before calling fill_blueprint
- Reject seconds and am/pm suffixes in the form layer
- Reuse _TIME_RE client-side so validation matches the server exactly
When it happens
Trigger: Calling fill_blueprint for a {hour}/{minute} template with time='7am', time='9:5', time='23:59:00', or time='24:00'.
Common situations: Users typing 12-hour times with am/pm; dropping the leading zero on minutes; including seconds; midnight written as 24:00 instead of 00:00.
Related errors
- a time is required
- unknown recurrence {preset!r} — one of {', '.join(WEEKDAY_PR
- unknown day {day!r}
- invalid interval {iv!r} — minutes as a positive integer
- unknown slot{'s' if len(unknown) > 1 else ''}: {', '.join(un
AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14).
Data as JSON: /api/errors/a4892b141c161599.
Report an issue: GitHub.