Jaded-Encoding-Thaumaturgy / vs-tools

Functions and utils related to VapourSynth
MIT License
22 stars 9 forks source link

`FunctionUtil.norm_clip` throws error: min() iterable argument is empty #155

Closed shssoichiro closed 1 month ago

shssoichiro commented 1 month ago

Updated all packages about 30 minutes ago and found that this error is now being thrown, traced back to this function.

Backtrace:

  File "/usr/lib/python3.12/site-packages/soifunc/deband.py", line 42, in retinex_deband
    deband = F3kdb().deband(clip, thr=(threshold << 2))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/stgpytools/types/utils.py", line 180, in _wrapper
    return self.function(obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/vsdeband/f3kdb.py", line 130, in deband
    func = FunctionUtil(clip, _func or self.deband, planes, (vs.GRAY, vs.YUV), range(8, 16))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/vstools/functions/funcs.py", line 111, in __init__
    self.norm_planes = normalize_planes(self.norm_clip, planes)
                                        ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/stgpytools/types/utils.py", line 567, in __get__
    cache[name] = function()
                  ^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/vstools/functions/funcs.py", line 124, in norm_clip
    clip = depth(self.clip, min(bits for bits in self.bitdepth if bits >= get_depth(self.clip)))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: min() iterable argument is empty
emotion3459 commented 1 month ago

Can you pinpoint the commit which causes this?

shssoichiro commented 1 month ago

A bisect indicates it seems to be caused by 086af436723fbe9ecfed9976b5fb0607560df81a