derailed/k9s · error
unable to parse path: %q
Error message
unable to parse path: %q
What it means
The Workload aggregated view composes row paths as 'gvr|namespace|name'; parsePath (internal/view/workload.go:69) splits on '|' and requires exactly 3 tokens. showRes (Enter on a row) calls parsePath and flashes this error when the selected row's path does not have the 3-part shape.
Source
Thrown at internal/view/workload.go:82
ui.KeyY: ui.NewKeyAction(yamlAction, w.yamlCmd, true),
ui.KeyD: ui.NewKeyAction("Describe", w.describeCmd, true),
})
}
func parsePath(path string) (*client.GVR, string, bool) {
tt := strings.Split(path, "|")
if len(tt) != 3 {
slog.Error("Unable to parse workload path", slogs.Path, path)
return client.NoGVR, client.FQN("", ""), false
}
return client.NewGVR(tt[0]), client.FQN(tt[1], tt[2]), true
}
func (*Workload) showRes(app *App, _ ui.Tabular, _ *client.GVR, path string) {
gvr, fqn, ok := parsePath(path)
if !ok {
app.Flash().Err(fmt.Errorf("unable to parse path: %q", path))
return
}
app.gotoResource(gvr.String(), fqn, false, true)
}
func (w *Workload) deleteCmd(evt *tcell.EventKey) *tcell.EventKey {
selections := w.GetTable().GetSelectedItems()
if len(selections) == 0 {
return evt
}
w.Stop()
defer w.Start()
{
msg := fmt.Sprintf("Delete %s %s?", w.GVR().R(), selections[0])
if len(selections) > 1 {
msg = fmt.Sprintf("Delete %d marked %s?", len(selections), w.GVR())
}View on GitHub (pinned to 2d3ccc6ba2)
Solutions
- Check ~/.config/k9s/views.yml for a workload view override and remove/repair it so col 1 remains the gvr|ns|name path
- Navigate to the concrete resource view directly (:deploy, :po) and open the resource from there
- Reproduce what the row contains: k9s logs print 'Unable to parse workload path' with the raw value — use it to see which token is missing
- Upgrade k9s if the path format changed between versions (custom fork vs upstream)
Example fix
// before: path = "v1/deployments ns1 web" (spaces, not '|')
// -> unable to parse path: "v1/deployments ns1 web"
// after: canonical 3-token path
// path = "apps/v1/deployments|ns1|web"
// parsePath -> GVR(apps/v1/deployments), FQN("ns1/web"), true Defensive patterns
Strategy: validation
Validate before calling
// guard the composed path before navigation
func validWorkloadPath(p string) bool {
tt := strings.Split(p, "|")
return len(tt) == 3 && tt[0] != "" && tt[2] != ""
} Prevention
- Do not override the workload view's first (path) column in views.yml
- Add the len==3 guard wherever you synthesize Workload row paths
- Log raw paths on failure (k9s already logs 'Unable to parse workload path') to catch bad columns early
When it happens
Trigger: Pressing Enter on a workload row whose path column is not 'gvr|ns|name' — caused by a views.yaml column override for the workload view replacing the composed first column, or an empty namespace/name collapsing the segments.
Common situations: Customizing the workload (pulses) view columns and dropping/reordering the path column; cluster-scoped resources rendered in workload with empty namespace producing 'gvr||name' still parses, but a fully mangled cell does not; forks that change the path format.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- no column index for %s
- unable to locate replicas from %s
- re.Description()
- no benchmark dir found in context
- no path specified in context
AI-assisted analysis of derailed/k9s@2d3ccc6ba2 (2026-08-15).
Data as JSON: /api/errors/2d549db16a5bc9e4.
Report an issue: GitHub.