{"record":{"id":"218ee92a634fcc72","repo":"AlistGo/alist","slug":"paths-is-required-218ee9","errorCode":null,"errorMessage":"paths is required","messagePattern":"paths is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/strm/driver.go","lineNumber":42,"sourceCode":"\tsingleRootKey string\n\n\tmediaExtSet      map[string]struct{}\n\tdownloadExtSet   map[string]struct{}\n\tnormalizedMode   string\n\tnormalizedPrefix string\n}\n\nfunc (d *Strm) Config() driver.Config {\n\treturn config\n}\n\nfunc (d *Strm) GetAddition() driver.Additional {\n\treturn &d.Addition\n}\n\nfunc (d *Strm) Init(ctx context.Context) error {\n\tif strings.TrimSpace(d.Paths) == \"\" {\n\t\treturn errors.New(\"paths is required\")\n\t}\n\tif d.SaveStrmToLocal && strings.TrimSpace(d.SaveStrmLocalPath) == \"\" {\n\t\treturn errors.New(\"SaveStrmLocalPath is required\")\n\t}\n\n\td.aliases = parseAliases(d.Paths)\n\tif len(d.aliases) == 0 {\n\t\treturn errors.New(\"no valid path mapping found\")\n\t}\n\n\td.autoFlatten = len(d.aliases) == 1\n\td.singleRootKey = \"\"\n\tif d.autoFlatten {\n\t\tfor k := range d.aliases {\n\t\t\td.singleRootKey = k\n\t\t}\n\t}\n","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/strm/driver.go#L24-L60","documentation":"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.","triggerScenarios":"Adding an Strm storage with the paths field left blank; the JSON addition sent by the UI containing \"paths\": \"\" or only spaces.","commonSituations":"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","solutions":["Fill the paths addition, e.g. /media/movies:Movies;/media/tv:TV (one mapping per line or separated per the driver's documented format)","Ensure the local directory exists and is readable by the alist process","Re-save storage so Init validates the mapping"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if strings.TrimSpace(addition.Paths) == \"\" {\n    return errors.New(\"paths is required — add at least one local:alias mapping, e.g. /media/movies:Movies\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Provide the paths mapping when first adding an Strm storage","Keep a template of the mapping syntax next to your storage configs","Validate config completeness before saving, not at runtime"],"tags":["strm","config","init","validation"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}