Jaded-Encoding-Thaumaturgy / vs-dehalo

VapourSynth dehaloing functions
MIT License
7 stars 5 forks source link

Package broken by change in vs-kernels #45

Closed shssoichiro closed 11 months ago

shssoichiro commented 11 months ago

The default arguments to some of the functions in this package include pre_supersampler: ScalerT = Nnedi3(0, field=0, shifter=NoShift). It looks like this commit changed NoShift so it can no longer be instantiated, which is resulting in the following error being thrown upon attempting to import vsdehalo:

Traceback (most recent call last):
  File "src/cython/vapoursynth.pyx", line 3124, in vapoursynth._vpy_evaluate
  File "src/cython/vapoursynth.pyx", line 3125, in vapoursynth._vpy_evaluate
  File "/data/encoding/Stargate SG-1/Season 1/Stargate SG-1 - s01e01-02.vpy", line 14, in <module>
    import vsdehalo
  File "/usr/lib/python3.11/site-packages/vsdehalo/__init__.py", line 3, in <module>
    from . import alpha, denoise, vine, warp
  File "/usr/lib/python3.11/site-packages/vsdehalo/alpha.py", line 123, in <module>
    class _fine_dehalo:
  File "/usr/lib/python3.11/site-packages/vsdehalo/alpha.py", line 137, in _fine_dehalo
    pre_supersampler: ScalerT = Nnedi3(0, field=0, shifter=NoShift), pre_downscaler: ScalerT = Point,
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 14, in __init__
  File "/usr/lib/python3.11/site-packages/vsaa/abstract.py", line 50, in __post_init__
    self._shifter = Kernel.ensure_obj(self.shifter or Catrom, self.__class__)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/vskernels/kernels/abstract.py", line 373, in ensure_obj
    return BaseScaler.ensure_obj(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/vskernels/kernels/abstract.py", line 69, in ensure_obj
    raise exception_cls(
UnknownKernelError: (Nnedi3) This NoShift can't be instantiated to be used!

Even if no functions within vsdehalo are called, this error is still thrown. The only way to avoid it is to stop importing vsdehalo.

Setsugennoao commented 11 months ago

Fixed in https://github.com/Jaded-Encoding-Thaumaturgy/vs-kernels/commit/e801c9edfadab8fe72af44fcbefb2a11ba4b7425