'NameError within moviepy subclip function
Traceback (most recent call last):
File "C:\Users\Evan\Desktop\Gamble\main.py", line 159, in <module>
main()
File "C:\Users\Evan\Desktop\Gamble\main.py", line 128, in main
link = create_clip(count, "WITHDRAW", root)
File "C:\Users\Evan\Desktop\Gamble\main.py", line 53, in create_clip
new = video.subclip(int(frame / 60 - 5), int(frame / 60 + 5))
File "C:\Users\Evan\anaconda3\envs\F\lib\site-packages\decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "C:\Users\Evan\anaconda3\envs\F\lib\site-packages\moviepy\decorators.py", line 79, in wrapper
names = inspect.getfullargspec(func).args
NameError: name 'func' is not defined
I haven't altered anything in the package nor could I find anything online about this the code causing this error in question is
with VideoFileClip(root) as video:
new = video.subclip(int(frame / 60 - 5), int(frame / 60 + 5))
new.write_videofile(f'{root.split(".")[0]}/{claim}{str(datetime.timedelta(seconds=int(frame / 60)))}', audio_codec='aac')
Solution 1:[1]
It looks like they accepted a PR that broke the code. I managed to fix it by going into decorators.py and changing any instance of "func" to "f"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Evan W. |
