.env, os.getenv, and the leak recovery you'll do at least once — step 7 of 9
Cursor read MODEL from the env without a default, so it's None
when the variable isn't set. The next line tries to call .startswith
on None and crashes with AttributeError. Fix line 5 so it falls
back to "claude-sonnet-4-6" when the env var is missing.
Expected output:
ok
The break is on line 6 — but read the whole snippet first.
⌘↵ runs the editor.read, then continue.
Cursor read MODEL from the env without a default, so it's None
when the variable isn't set. The next line tries to call .startswith
on None and crashes with AttributeError. Fix line 5 so it falls
back to "claude-sonnet-4-6" when the env var is missing.
Expected output:
ok
The break is on line 6 — but read the whole snippet first.
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.