{"record":{"id":"3db3cb74d2d9d74b","repo":"spicetify/cli","slug":"config-current-theme-is-blank","errorCode":null,"errorMessage":"config \"current_theme\" is blank","messagePattern":"config \"current_theme\" is blank","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cmd/path.go","lineNumber":18,"sourceCode":"package cmd\n\nimport (\n\t\"errors\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/spicetify/cli/src/utils\"\n)\n\n// ThemeAssetPath returns path of theme; assets, color.ini, theme.js and user.css\nfunc ThemeAssetPath(kind string) (string, error) {\n\tInitSetting()\n\n\tif kind == \"root\" {\n\t\treturn filepath.Join(utils.GetExecutableDir(), \"Themes\"), nil\n\t} else if len(themeFolder) == 0 {\n\t\treturn \"\", errors.New(`config \"current_theme\" is blank`)\n\t}\n\n\tif kind == \"folder\" {\n\t\treturn themeFolder, nil\n\t} else if kind == \"color\" {\n\t\tcolor := filepath.Join(themeFolder, \"color.ini\")\n\t\treturn color, nil\n\t} else if kind == \"css\" {\n\t\tcss := filepath.Join(themeFolder, \"user.css\")\n\t\treturn css, nil\n\t} else if kind == \"js\" {\n\t\tjs := filepath.Join(themeFolder, \"theme.js\")\n\t\treturn js, nil\n\t} else if kind == \"assets\" {\n\t\tassets := filepath.Join(themeFolder, \"assets\")\n\t\treturn assets, nil\n\t}\n","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/spicetify/cli/blob/1f13f736163165234eef4fb792a03f9b5b732aa4/src/cmd/path.go#L1-L36","documentation":"ThemeAssetPath resolves theme file/folder paths, but the theme name comes from the `current_theme` config value. When that config entry is empty, no theme is selected, so any non-`root` kind lookup cannot be resolved and this error is thrown from src/cmd/path.go.","triggerScenarios":"Calling ThemeAssetPath(\"folder\"|\"color\"|\"css\"|\"js\"|\"assets\") (or running `spicetify path -c ...`) while the `current_theme` line in config-xpui.ini is blank — e.g. fresh install, config reset, or theme never set via `spicetify config current_theme <name>`.","commonSituations":"Fresh spicetify installation where setup was never completed; a corrupted/overwritten config file; CI environments lacking a config; users who deleted the Themes folder and cleared the setting.","solutions":["Set a theme: `spicetify config current_theme <theme-name>` (e.g. SpicetifyDefault), then retry","Verify config-xpui.ini contains a non-empty current_theme value","Reinstall/repair the config with `spicetify backup apply` after configuring","Use kind \"root\" if you only need the Themes directory (works without current_theme)"],"exampleFix":"// before (blank in config-xpui.ini)\ncurrent_theme =\n// after\ncurrent_theme = SpicetifyDefault","handlingStrategy":"validation","validationCode":"theme := cfg.Get(\"Setting\", \"current_theme\")\nif theme == \"\" {\n    return errors.New(\"set current_theme in config-xpui.ini before resolving theme paths\")\n}","typeGuard":null,"tryCatchPattern":"path, err := cmd.ThemeAssetPath(\"css\")\nif err != nil && strings.Contains(err.Error(), `config \"current_theme\" is blank`) {\n    // prompt user to run: spicetify config current_theme <name>\n    return err\n}","preventionTips":["Always set current_theme before using theme path lookups","Use kind \"root\" if you only need the Themes directory (no theme required)","After config resets/reinstalls, re-run `spicetify config current_theme ...`","In scripts, check the config value before invoking theme-dependent commands"],"tags":["config","theme","missing-config"],"backgroundTag":"missing-config-value","analyzedSha":"1f13f736163165234eef4fb792a03f9b5b732aa4","analyzedAt":"2026-08-31T18:57:59.754Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}