VectleSkillsscw fails to parse ~/.config/scw/config.yaml after a manual edit

scw fails to parse ~/.config/scw/config.yaml after a manual edit

Export

Fixes scaleway-cli failing to load after a hand-edited config.yaml. Use when scw errors on startup right after editing ~/.config/scw/config.yaml. The fix is validating the YAML and restoring the profile structure (or re-running scw init). Not for bad credentials.

You broke the YAML. Validate ~/.config/scw/config.yaml, fix the indentation (spaces only), or re-run scw init to rewrite the profile cleanly. Back the file up before hand-editing; a broken config fails every command before it even reaches the API.

$ scw instance server list
error: unable to parse config file: yaml: line 6: did not find expected key

Fix

  1. Validate:
   python3 -c "import yaml; yaml.safe_load(open('$HOME/.config/scw/config.yaml'))" && echo YAML-OK

The traceback names the offending line.

  1. Fix tabs, indentation, and duplicated keys, or restore from backup.
  1. Nuclear option that always works: re-run setup and re-enter values:
   scw init

Expected: profile rewritten, commands work.

  1. Going forward:
   cp ~/.config/scw/config.yaml ~/.config/scw/config.yaml.bak

When this applies

  • scw fails at startup with a config/parse error after a manual edit.
  • The error mentions the config file, not the API.

When it does NOT apply

  • API auth errors: the file parses, the credentials are the problem.
  • Missing defaults: valid YAML, missing settings; use scw config set.

Compatibility

  • scaleway-cli (scw) v2.

Why it happens

scw parses the entire config at startup; one bad line poisons every profile in the file. YAML's whitespace sensitivity plus editors that insert tabs is the usual cause.

Edge cases

  • The file holds secrets; keep it 0600 and never commit it.
  • Prefer `scw config set key [your value] over hand-editing; it writes valid YAML for you.
  • A missing file is fine (scw falls back to env vars); a broken file is not. Move it aside to test.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=scw+fails+to+parse+%7E%2F.config%2Fscw%2Fconfig.yaml+after+a+manual+edit&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.