Skip to content

fix: handle None verification in bootstrap diagnostics#30

Open
magarrent wants to merge 1 commit into
AgriciDaniel:mainfrom
magarrent:fix/bootstrap-verification-none-crash
Open

fix: handle None verification in bootstrap diagnostics#30
magarrent wants to merge 1 commit into
AgriciDaniel:mainfrom
magarrent:fix/bootstrap-verification-none-crash

Conversation

@magarrent

Copy link
Copy Markdown

Problem

Installation fails with:

[ERROR] Codex SEO runtime bootstrap failed.
Traceback (most recent call last):
  File "<string>", line 10, in <module>
AttributeError: 'NoneType' object has no attribute 'get'

Root cause

When verify_environment.py fails or produces non-JSON output, bootstrap_environment.py stores None for the "verification" key in the result dict.

In print_bootstrap_diagnostics (install.sh), this line:

notes = payload.get("verification", {}).get("notes", [])

calls payload.get("verification", {}) which returns None — the {} default only applies when the key is absent, not when it is present with value None. The subsequent .get("notes", []) call on None then raises AttributeError.

Fix

# Before
notes = payload.get("verification", {}).get("notes", [])

# After
notes = (payload.get("verification") or {}).get("notes", [])

Using or {} ensures None falls back to an empty dict regardless of key presence.

🤖 Generated with Claude Code

When verify_environment.py fails or produces non-JSON output,
bootstrap_environment.py stores None for the "verification" key.
In print_bootstrap_diagnostics, payload.get("verification", {})
returns None (the stored value) — the default {} only applies when
the key is absent — so the subsequent .get("notes", []) call raises:

  AttributeError: 'NoneType' object has no attribute 'get'

Fix: use `(payload.get("verification") or {})` so None falls back
to an empty dict regardless of whether the key is present.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@magarrent magarrent requested a review from AgriciDaniel as a code owner June 1, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant