Skip to content

can't load the catppuccin theme (latest from melpa) #208

@g1001

Description

@g1001

Getting error string-to-number: Wrong type argument: arrayp, nil on M-x load-theme, after choosing catppuccin

I'm running GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.42,
cairo version 1.18.0) of 2024-06-26
Running that as a flatpak on OpenSUSE Tumbleweed.

After setting debug-on-error I get this in the messages buffer:

Stack trace
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  substring(nil 1 3)
  (string-to-number (substring color i (+ i 2)) 16)
  (closure ((color)) (i) (string-to-number (substring color i (+ i 2)) 16))(1)
  mapcar((closure ((color)) (i) (string-to-number (substring color i (+ i 2)) 16)) (1 3 5))
  (closure (t) (color) (mapcar #'(lambda (i) (string-to-number (substring color i (+ i 2)) 16)) '(1 3 5)))(nil)
  funcall((closure (t) (color) (mapcar #'(lambda (i) (string-to-number (substring color i (+ i 2)) 16)) '(1 3 5))) nil)
  (mapcar #'(lambda (v) (funcall rnd (min 255 (+ (* (- 255 v) factor) v)))) (funcall hex-to-rgb color))
  (apply rgb-to-hex (mapcar #'(lambda (v) (funcall rnd (min 255 (+ (* ... factor) v)))) (funcall hex-to-rgb color)))
  (let* ((factor (/ value 100.0))) (apply rgb-to-hex (mapcar #'(lambda (v) (funcall rnd (min 255 (+ ... v)))) (funcall hex-to-rgb color))))
  catppuccin-lighten(nil 17)
  (if (eq catppuccin-flavor 'latte) (catppuccin-darken (catppuccin-color 'base) 12) (catppuccin-lighten (catppuccin-color 'base) 17))
  (let ((ctp-selection (if (eq catppuccin-flavor 'latte) (catppuccin-darken (catppuccin-color 'base) 12) (catppuccin-lighten (catppuccin-color 'base) 17))) (ctp-current (if (eq catppuccin-flavor 'latte) (catppuccin-darken (catppuccin-color 'base) 5) (catppuccin-lighten (catppuccin-color 'base) 5))) (ctp-crust (catppuccin-color 'crust)) (ctp-mantle (catppuccin-color 'mantle)) (ctp-base (catppuccin-color 'base)) (ctp-surface0 (catppuccin-color 'surface0)) (ctp-surface1 (catppuccin-color 'surface1)) (ctp-surface2 (catppuccin-color 'surface2)) (ctp-overlay0 (catppuccin-color 'overlay0)) (ctp-overlay1 (catppuccin-color 'overlay1)) (ctp-overlay2 (catppuccin-color 'overlay2)) (ctp-subtext0 (catppuccin-color 'subtext0)) (ctp-subtext1 (catppuccin-color 'subtext1)) (ctp-text (catppuccin-color 'text)) (ctp-lavender (catppuccin-color 'lavender)) (ctp-blue (catppuccin-color 'blue)) (ctp-sapphire (catppuccin-color 'sapphire)) (ctp-sky (catppuccin-color 'sky)) (ctp-teal (catppuccin-color 'teal)) (ctp-green (catppuccin-color 'green)) (ctp-yellow (catppuccin-color 'yellow)) (ctp-peach (catppuccin-color 'peach)) (ctp-maroon (catppuccin-color 'maroon)) (ctp-red (catppuccin-color 'red)) (ctp-mauve (catppuccin-color 'mauve)) (ctp-pink (catppuccin-color 'pink)) (ctp-flamingo (catppuccin-color 'flamingo)) (ctp-rosewater (catppuccin-color 'rosewater)) (undef "#ff00ff")) (backquote (:background ,ctp-rosewater)))
  eval((let ((ctp-selection (if (eq catppuccin-flavor 'latte) (catppuccin-darken (catppuccin-color 'base) 12) (catppuccin-lighten (catppuccin-color 'base) 17))) (ctp-current (if (eq catppuccin-flavor 'latte) (catppuccin-darken (catppuccin-color 'base) 5) (catppuccin-lighten (catppuccin-color 'base) 5))) (ctp-crust (catppuccin-color 'crust)) (ctp-mantle (catppuccin-color 'mantle)) (ctp-base (catppuccin-color 'base)) (ctp-surface0 (catppuccin-color 'surface0)) (ctp-surface1 (catppuccin-color 'surface1)) (ctp-surface2 (catppuccin-color 'surface2)) (ctp-overlay0 (catppuccin-color 'overlay0)) (ctp-overlay1 (catppuccin-color 'overlay1)) (ctp-overlay2 (catppuccin-color 'overlay2)) (ctp-subtext0 (catppuccin-color 'subtext0)) (ctp-subtext1 (catppuccin-color 'subtext1)) (ctp-text (catppuccin-color 'text)) (ctp-lavender (catppuccin-color 'lavender)) (ctp-blue (catppuccin-color 'blue)) (ctp-sapphire (catppuccin-color 'sapphire)) (ctp-sky (catppuccin-color 'sky)) (ctp-teal (catppuccin-color 'teal)) (ctp-green (catppuccin-color 'green)) (ctp-yellow (catppuccin-color 'yellow)) (ctp-peach (catppuccin-color 'peach)) (ctp-maroon (catppuccin-color 'maroon)) (ctp-red (catppuccin-color 'red)) (ctp-mauve (catppuccin-color 'mauve)) (ctp-pink (catppuccin-color 'pink)) (ctp-flamingo (catppuccin-color 'flamingo)) (ctp-rosewater (catppuccin-color 'rosewater)) (undef "#ff00ff")) (backquote (:background ,ctp-rosewater))))
  (let (reduced-color-list) (let ((tail colors)) (while tail (let ((col (car tail))) (setq reduced-color-list (cons (list (car col) (funcall func col)) reduced-color-list)) (setq tail (cdr tail)))) reduced-color-list) (eval (list 'let reduced-color-list (list 'backquote spec))))
  (closure ((colors (undef "#ff00ff" "#ff00ff") (ctp-rosewater (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-flamingo (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-pink (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-mauve (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-red (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-maroon (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-peach (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-yellow (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-green (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-teal (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-sky (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-sapphire (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-blue (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-lavender (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-text (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-subtext1 (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-subtext0 (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-overlay2 (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-overlay1 (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-overlay0 (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-surface2 (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-surface1 (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-surface0 (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-base (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-mantle (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-crust (catppuccin-color ...) (catppuccin-quantize-color ...)) (ctp-current (if ... ... ...) (catppuccin-quantize-color ...)) (ctp-selection (if ... ... ...) (catppuccin-quantize-color ...)))) (func spec) (let (reduced-color-list) (let ((tail colors)) (while tail (let ... ... ...)) reduced-color-list) (eval (list 'let reduced-color-list (list ... spec)))))(cadr (:background ,ctp-rosewater))
  funcall((closure ((colors (undef "#ff00ff" "#ff00ff") (ctp-rosewater (catppuccin-color 'rosewater) (catppuccin-quantize-color (catppuccin-color 'rosewater))) (ctp-flamingo (catppuccin-color 'flamingo) (catppuccin-quantize-color (catppuccin-color 'flamingo))) (ctp-pink (catppuccin-color 'pink) (catppuccin-quantize-color (catppuccin-color 'pink))) (ctp-mauve (catppuccin-color 'mauve) (catppuccin-quantize-color (catppuccin-color 'mauve))) (ctp-red (catppuccin-color 'red) (catppuccin-quantize-color (catppuccin-color 'red))) (ctp-maroon (catppuccin-color 'maroon) (catppuccin-quantize-color (catppuccin-color 'maroon))) (ctp-peach (catppuccin-color 'peach) (catppuccin-quantize-color (catppuccin-color 'peach))) (ctp-yellow (catppuccin-color 'yellow) (catppuccin-quantize-color (catppuccin-color 'yellow))) (ctp-green (catppuccin-color 'green) (catppuccin-quantize-color (catppuccin-color 'green))) (ctp-teal (catppuccin-color 'teal) (catppuccin-quantize-color (catppuccin-color 'teal))) (ctp-sky (catppuccin-color 'sky) (catppuccin-quantize-color (catppuccin-color 'sky))) (ctp-sapphire (catppuccin-color 'sapphire) (catppuccin-quantize-color (catppuccin-color 'sapphire))) (ctp-blue (catppuccin-color 'blue) (catppuccin-quantize-color (catppuccin-color 'blue))) (ctp-lavender (catppuccin-color 'lavender) (catppuccin-quantize-color (catppuccin-color 'lavender))) (ctp-text (catppuccin-color 'text) (catppuccin-quantize-color (catppuccin-color 'text))) (ctp-subtext1 (catppuccin-color 'subtext1) (catppuccin-quantize-color (catppuccin-color 'subtext1))) (ctp-subtext0 (catppuccin-color 'subtext0) (catppuccin-quantize-color (catppuccin-color 'subtext0))) (ctp-overlay2 (catppuccin-color 'overlay2) (catppuccin-quantize-color (catppuccin-color 'overlay2))) (ctp-overlay1 (catppuccin-color 'overlay1) (catppuccin-quantize-color (catppuccin-color 'overlay1))) (ctp-overlay0 (catppuccin-color 'overlay0) (catppuccin-quantize-color (catppuccin-color 'overlay0))) (ctp-surface2 (catppuccin-color 'surface2) (catppuccin-quantize-color (catppuccin-color 'surface2))) (ctp-surface1 (catppuccin-color 'surface1) (catppuccin-quantize-color (catppuccin-color 'surface1))) (ctp-surface0 (catppuccin-color 'surface0) (catppuccin-quantize-color (catppuccin-color 'surface0))) (ctp-base (catppuccin-color 'base) (catppuccin-quantize-color (catppuccin-color 'base))) (ctp-mantle (catppuccin-color 'mantle) (catppuccin-quantize-color (catppuccin-color 'mantle))) (ctp-crust (catppuccin-color 'crust) (catppuccin-quantize-color (catppuccin-color 'crust))) (ctp-current (if (eq catppuccin-flavor 'latte) (catppuccin-darken (catppuccin-color ...) 5) (catppuccin-lighten (catppuccin-color ...) 5)) (catppuccin-quantize-color (if (eq catppuccin-flavor ...) (catppuccin-darken ... 5) (catppuccin-lighten ... 5)))) (ctp-selection (if (eq catppuccin-flavor 'latte) (catppuccin-darken (catppuccin-color ...) 12) (catppuccin-lighten (catppuccin-color ...) 17)) (catppuccin-quantize-color (if (eq catppuccin-flavor ...) (catppuccin-darken ... 12) (catppuccin-lighten ... 17)))))) (func spec) (let (reduced-color-list) (let ((tail colors)) (while tail (let ((col ...)) (setq reduced-color-list (cons ... reduced-color-list)) (setq tail (cdr tail)))) reduced-color-list) (eval (list 'let reduced-color-list (list 'backquote spec))))) cadr (:background ,ctp-rosewater))
  (list '((min-colors 16777216)) (funcall expand-with-func 'cadr spec))
  (list (list '((min-colors 16777216)) (funcall expand-with-func 'cadr spec)) (list t (funcall expand-with-func '(lambda (v) (cadr (cdr v))) spec)))
  (list face (list (list '((min-colors 16777216)) (funcall expand-with-func 'cadr spec)) (list t (funcall expand-with-func '(lambda (v) (cadr (cdr v))) spec))))
  (cons (list face (list (list '((min-colors 16777216)) (funcall expand-with-func 'cadr spec)) (list t (funcall expand-with-func '(lambda (v) (cadr ...)) spec)))) whole-theme)
  (setq whole-theme (cons (list face (list (list '((min-colors 16777216)) (funcall expand-with-func 'cadr spec)) (list t (funcall expand-with-func '(lambda ... ...) spec)))) whole-theme))
  (let ((face x1) (spec x2)) (setq whole-theme (cons (list face (list (list '(...) (funcall expand-with-func 'cadr spec)) (list t (funcall expand-with-func '... spec)))) whole-theme)))
  (let* ((x1 (car-safe x0)) (x2 (cdr-safe x0))) (let ((face x1) (spec x2)) (setq whole-theme (cons (list face (list (list '... (funcall expand-with-func ... spec)) (list t (funcall expand-with-func ... spec)))) whole-theme))))
  (progn (ignore (consp x0)) (let* ((x1 (car-safe x0)) (x2 (cdr-safe x0))) (let ((face x1) (spec x2)) (setq whole-theme (cons (list face (list (list ... ...) (list t ...))) whole-theme)))))
  (let ((x0 (car tail))) (progn (ignore (consp x0)) (let* ((x1 (car-safe x0)) (x2 (cdr-safe x0))) (let ((face x1) (spec x2)) (setq whole-theme (cons (list face (list ... ...)) whole-theme))))) (setq tail (cdr tail)))
  (while tail (let ((x0 (car tail))) (progn (ignore (consp x0)) (let* ((x1 (car-safe x0)) (x2 (cdr-safe x0))) (let ((face x1) (spec x2)) (setq whole-theme (cons (list face ...) whole-theme))))) (setq tail (cdr tail))))
  (let ((tail faces)) (while tail (let ((x0 (car tail))) (progn (ignore (consp x0)) (let* ((x1 (car-safe x0)) (x2 (cdr-safe x0))) (let ((face x1) (spec x2)) (setq whole-theme (cons ... whole-theme))))) (setq tail (cdr tail)))))
  (let* ((expand-with-func #'(lambda (func spec) (let (reduced-color-list) (let (...) (while tail ...) reduced-color-list) (eval (list ... reduced-color-list ...))))) whole-theme) (let ((tail faces)) (while tail (let ((x0 (car tail))) (progn (ignore (consp x0)) (let* ((x1 ...) (x2 ...)) (let (... ...) (setq whole-theme ...)))) (setq tail (cdr tail))))) whole-theme)
  (apply #'custom-theme-set-faces 'catppuccin (let* ((expand-with-func #'(lambda (func spec) (let (reduced-color-list) (let ... ... reduced-color-list) (eval ...)))) whole-theme) (let ((tail faces)) (while tail (let ((x0 (car tail))) (progn (ignore (consp x0)) (let* (... ...) (let ... ...))) (setq tail (cdr tail))))) whole-theme))
  (let ((colors '((undef "#ff00ff" "#ff00ff") (ctp-rosewater ... ...) (ctp-flamingo ... ...) (ctp-pink ... ...) (ctp-mauve ... ...) (ctp-red ... ...) (ctp-maroon ... ...) (ctp-peach ... ...) (ctp-yellow ... ...) (ctp-green ... ...) (ctp-teal ... ...) (ctp-sky ... ...) (ctp-sapphire ... ...) (ctp-blue ... ...) (ctp-lavender ... ...) (ctp-text ... ...) (ctp-subtext1 ... ...) (ctp-subtext0 ... ...) (ctp-overlay2 ... ...) (ctp-overlay1 ... ...) (ctp-overlay0 ... ...) (ctp-surface2 ... ...) (ctp-surface1 ... ...) (ctp-surface0 ... ...) (ctp-base ... ...) (ctp-mantle ... ...) (ctp-crust ... ...) (ctp-current ... ...) (ctp-selection ... ...))) (faces '((cursor :background ...) (default :background ... :foreground ...) (default-italic :slant italic) (hl-todo :foreground ...) (error :foreground ...) (ffap :inherit match) (fringe :background ... :foreground ...) (header-line :inherit mode-line) (help-key-binding :background ... :foreground ... :box ...) (highlight :foreground ... :background ...) (hl-line :background ... :extend t) (info-menu-star :foreground ...) (info-quoted-name :foreground ...) (info-string :foreground ...) (lazy-highlight :foreground ... :background ...) (link :foreground ... :underline t) (link-unvisited :foreground ... :underline t) (linum :inherit default :foreground ... :background ...) (line-number :inherit default :foreground ... :background ...) (line-number-current-line :inherit line-number :foreground ...) (match :background ... :foreground ...) (menu :background ... :inverse-video nil :foreground ...) (minibuffer-prompt :weight normal :foreground ...) (mode-line :background ... nil :foreground ...) (mode-line-inactive :background ... :inverse-video nil :foreground ...) (read-multiple-choice-face :inherit completions-first-difference) (region :background ... :extend t) (shadow :foreground ...) (success :foreground ...) (warning :foreground ...) (tooltip :foreground ... :background ...) (trailing-whitespace :inherit warning) (window-divider :foreground ...) (vertical-border :foreground ...) (tty-menu-enabled-face :foreground ... :inverse-video nil :background ...) (tty-menu-disabled-face :background ... :inverse-video nil :foreground ...) (tty-menu-selected-face :foreground ... :background ...) (solaire-default-face :background ... :foreground ...) ...))) (apply #'custom-theme-set-faces 'catppuccin (let* ((expand-with-func #'...) whole-theme) (let ((tail faces)) (while tail (let ... ... ...))) whole-theme)) (apply #'custom-theme-set-variables 'catppuccin (let ((get-func (let* ... ...))) (list (list 'ansi-color-names-vector (vector ... ... ... ... ... ... ... ...))) (list (list 'rustic-ansi-faces (list ... ... ... ... ... ... ... ... ...))))))
  eval-buffer(nil nil "/home/george/.emacs.d/elpa/catppuccin-theme-202412...")  ; Reading at buffer position 71956
  load-theme(catppuccin nil nil)
  funcall-interactively(load-theme catppuccin nil nil)
  call-interactively(load-theme record nil)
  command-execute(load-theme record)
  execute-extended-command(nil "load-theme" "load-th")
  funcall-interactively(execute-extended-command nil "load-theme" "load-th")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions