Skip to content

ImageColorizer errors when trying to use Xresources "min() iterable argument is empty" #5

@Micaias32

Description

@Micaias32

here's the error:

$ ImageColorizer wall.png out.png -x
  File "./ImageColorizer/.venv/bin/ImageColorizer", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "./.venv/lib/python3.13/site-packages/ImageColorizer/__main__.py", line 52, in main
    img_col.generate(args.input, args.output, show=args.show,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                     quantize=(not args.no_quantize), blur=args.blur, invert=args.invert)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./ImageColorizer/.venv/lib/python3.13/site-packages/ImageColorizer/ClassModule.py", line 129, in generate
    new_color = min(differences)[1]
                ~~~^^^^^^^^^^^^^
ValueError: min() iterable argument is empty

and here's the `~/.Xresources:

*.faceName: Fira Code Nerd Font
*.faceSize: 12
*.renderFont: true
*background: #0c0d0e
*color0: #0c0d0e
*color1: #e31a1c
*color10: #2e2f30
*color11: #515253
*color12: #959697
*color13: #dadbdc
*color14: #b15928
*color15: #fcfdfe
*color2: #31a354
*color3: #dca060
*color4: #3182bd
*color5: #756bb1
*color6: #80b1d3
*color7: #b7b8b9
*color8: #737475
*color9: #e6550d
*cursorColor: #b7b8b9
*foreground: #b7b8b9
Sxiv.background: #959697
Sxiv.font: Noto Sans-12
Sxiv.foreground: #2e2f30
Xcursor.size: 32
Xcursor.theme: Posy_Cursor_Black

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions