AlistGo/alist · error

paths is required

Error message

paths is required

What it means

The Strm driver Init() requires at least one local->alias path mapping in the 'paths' addition field (format like /local/dir:alias). An empty or all-whitespace Paths string means the driver has nothing to scan for .strm files, so it refuses to initialize.

Source

Thrown at drivers/strm/driver.go:42

	singleRootKey string

	mediaExtSet      map[string]struct{}
	downloadExtSet   map[string]struct{}
	normalizedMode   string
	normalizedPrefix string
}

func (d *Strm) Config() driver.Config {
	return config
}

func (d *Strm) GetAddition() driver.Additional {
	return &d.Addition
}

func (d *Strm) Init(ctx context.Context) error {
	if strings.TrimSpace(d.Paths) == "" {
		return errors.New("paths is required")
	}
	if d.SaveStrmToLocal && strings.TrimSpace(d.SaveStrmLocalPath) == "" {
		return errors.New("SaveStrmLocalPath is required")
	}

	d.aliases = parseAliases(d.Paths)
	if len(d.aliases) == 0 {
		return errors.New("no valid path mapping found")
	}

	d.autoFlatten = len(d.aliases) == 1
	d.singleRootKey = ""
	if d.autoFlatten {
		for k := range d.aliases {
			d.singleRootKey = k
		}
	}

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Fill the paths addition, e.g. /media/movies:Movies;/media/tv:TV (one mapping per line or separated per the driver's documented format)
  2. Ensure the local directory exists and is readable by the alist process
  3. Re-save storage so Init validates the mapping
Defensive patterns

Strategy: validation

Validate before calling

if strings.TrimSpace(addition.Paths) == "" {
    return errors.New("paths is required — add at least one local:alias mapping, e.g. /media/movies:Movies")
}

Prevention

When it happens

Trigger: Adding an Strm storage with the paths field left blank; the JSON addition sent by the UI containing "paths": "" or only spaces.

Common situations: User assumes the driver works like a generic mount and skips the mapping config; Config copied from another storage type with the paths field dropped; Whitespace-only value pasted accidentally

Related errors


AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15). Data as JSON: /api/errors/218ee92a634fcc72. Report an issue: GitHub.