Zulko / moviepy

Video editing with Python
https://zulko.github.io/moviepy/
MIT License
12.07k stars 1.51k forks source link

TypeError: '<' not supported between instances of 'str' and 'int' #2146

Closed ganeshIITB closed 3 months ago

ganeshIITB commented 3 months ago

Expected Behavior

While running "audioClipped = audio.subclip(startVal,endVal)" wherein startVal = '0:00' and endVal = '15:16', the audio is expected to clip till 15 min, 16 sec. It worked fine till anaconda was updated from 2.5.3 to 2.5.4

Actual Behavior

But, after updating, following error appears

Traceback (most recent call last):

File ~/opt/anaconda3/lib/python3.8/site-packages/spyder_kernels/py3compat.py:356 in compat_exec exec(code, globals, locals)

File ~/Desktop/videoEditing/Varnam/clipAudioVarnam.py:43 audioClipped = audio.subclip(posList[indexVal],endVal)

File ~/opt/anaconda3/lib/python3.8/site-packages/decorator.py:232 in fun return caller(func, *(extras + args), **kw)

File ~/opt/anaconda3/lib/python3.8/site-packages/moviepy/decorators.py:89 in wrapper return f(*new_a, **new_kw)

File ~/opt/anaconda3/lib/python3.8/site-packages/decorator.py:232 in fun return caller(func, *(extras + args), **kw)

File ~/opt/anaconda3/lib/python3.8/site-packages/moviepy/decorators.py:29 in apply_to_mask newclip = f(clip, *a, **k)

File ~/opt/anaconda3/lib/python3.8/site-packages/decorator.py:232 in fun return caller(func, *(extras + args), **kw)

File ~/opt/anaconda3/lib/python3.8/site-packages/moviepy/decorators.py:41 in apply_to_audio newclip = f(clip, *a, **k)

File ~/opt/anaconda3/lib/python3.8/site-packages/moviepy/Clip.py:379 in subclip if t_start < 0:

TypeError: '<' not supported between instances of 'str' and 'int'

Steps to Reproduce the Problem

Specifications

ganeshIITB commented 3 months ago

Fixed by giving the startVal and endVal in seconds as int