OtterMind/Chat2DB · error · ConfigurationError
GITHUB_EVENT_PATH does not point to an event payload
Error message
GITHUB_EVENT_PATH does not point to an event payload
What it means
Raised by main (notify_qq.py:586) as a ConfigurationError when GITHUB_EVENT_PATH does not point to an existing file. GitHub Actions writes the event payload to this path; if it is missing or unreadable, the notifier cannot build a notification. This is the first check in main and runs for every mode.
Source
Thrown at script/github/notify_qq.py:586
)
def _required_environment() -> tuple[str, str]:
names = ("QQ_RELAY_URL", "QQ_RELAY_TOKEN")
missing = [name for name in names if not os.environ.get(name)]
if missing:
raise ConfigurationError("Missing required GitHub Actions secrets: " + ", ".join(missing))
return tuple(os.environ[name] for name in names) # type: ignore[return-value]
def _is_true(value: str | None) -> bool:
return str(value or "").strip().lower() in {"1", "true", "yes", "on"}
def main() -> int:
event_path = Path(os.environ.get("GITHUB_EVENT_PATH", ""))
if not event_path.is_file():
raise ConfigurationError("GITHUB_EVENT_PATH does not point to an event payload")
with event_path.open(encoding="utf-8") as event_file:
payload = json.load(event_file)
event_name = os.environ.get("GITHUB_EVENT_NAME", "")
repository = os.environ.get("GITHUB_REPOSITORY", "OtterMind/Chat2DB")
actor = os.environ.get("GITHUB_ACTOR", "unknown")
server_url = os.environ.get("GITHUB_SERVER_URL", "https://github.com")
run_id = os.environ.get("GITHUB_RUN_ID", "")
run_url = f"{server_url}/{repository}/actions/runs/{run_id}" if run_id else ""
include_url = _is_true(os.environ.get("QQ_INCLUDE_URL", "true"))
prepared_path = os.environ.get("QQ_PREPARED_MESSAGE_PATH")
if prepared_path:
event_name, message = _read_prepared_message(Path(prepared_path), repository)
action = "prepared"
else:
message = build_notification(View on GitHub (pinned to 5ee1e990e7)
Solutions
- Run the script only inside a GitHub Actions job where GITHUB_EVENT_PATH is set by the runner.
- For local testing, set GITHUB_EVENT_PATH to a real JSON payload file and GITHUB_EVENT_NAME accordingly.
- Verify no prior step deletes the event payload file.
Example fix
# local test GITHUB_EVENT_PATH=./sample-event.json GITHUB_EVENT_NAME=issues python script/github/notify_qq.py
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
event_path = Path(os.environ.get("GITHUB_EVENT_PATH", ""))
if not event_path.is_file():
raise SystemExit("GITHUB_EVENT_PATH must point to a real event payload file") Prevention
- Run notify_qq.py inside a GitHub Actions job where the runner sets GITHUB_EVENT_PATH.
- For local runs, set GITHUB_EVENT_PATH to a checked-in sample payload and GITHUB_EVENT_NAME.
When it happens
Trigger: GITHUB_EVENT_PATH is unset (running outside GitHub Actions), empty, or points at a path that does not exist or is a directory. Any execution context lacking the runner's event payload file hits this.
Common situations: Running notify_qq.py locally without setting GITHUB_EVENT_PATH/GITHUB_EVENT_NAME; a custom runner that clears the event file; invoking the script from a non-Actions container; the event file removed before the step runs.
Related errors
- Cannot collect unsupported event: {event_name}
- Prepared QQ notification is missing or too large
- Prepared QQ notification repository does not match
- Prepared QQ notification event is not allowed
- Prepared QQ notification message is invalid
AI-assisted analysis of OtterMind/Chat2DB@5ee1e990e7 (2026-08-14).
Data as JSON: /api/errors/454956b14d65dbf0.
Report an issue: GitHub.