NameError在moviepy子剪辑函数


Traceback (most recent call last):
File "C:UsersEvanDesktopGamblemain.py", line 159, in <module>
main()
File "C:UsersEvanDesktopGamblemain.py", line 128, in main
link = create_clip(count, "WITHDRAW", root)
File "C:UsersEvanDesktopGamblemain.py", line 53, in create_clip
new = video.subclip(int(frame / 60 - 5), int(frame / 60 + 5))
File "C:UsersEvananaconda3envsFlibsite-packagesdecorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "C:UsersEvananaconda3envsFlibsite-packagesmoviepydecorators.py", line 79, in wrapper
names = inspect.getfullargspec(func).args
NameError: name 'func' is not defined

我没有在包中改变任何东西,也不能在网上找到关于这个的任何东西,导致这个错误的代码是

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')

看起来他们接受了一个破坏代码的PR。我设法通过进入decorators.py并更改"func"的任何实例来修复它。";f"

最新更新