williamfzc / stagesepx

detect stages in video automatically
MIT License
434 stars 125 forks source link

AttributeError: 'NoneType' object has no attribute 'frame_id' #179

Closed milu534334864 closed 2 years ago

milu534334864 commented 2 years ago

按照介绍想快速使用体验一下,出现报错,报错信息如下 Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\Scripts\stagesepx-script.py", line 11, in load_entry_point('stagesepx==0.16.2', 'console_scripts', 'stagesepx')() File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\stagesepx\cli.py", line 24, in main fire.Fire(TerminalCli) File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\fire\core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\fire\core.py", line 466, in _Fire component, remaining_args = _CallAndUpdateTrace( File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\fire\core.py", line 681, in _CallAndUpdateTrace component = fn(*varargs, kwargs) File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\stagesepx\api.py", line 265, in analyse res = cutter.cut(video) File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\stagesepx\cutter\cutter.py", line 242, in cut range_list = self._convert_video_into_range_list( File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\stagesepx\cutter\cutter.py", line 164, in _convert_video_into_range_list frame_list = [self._apply_hook(each) for each in frame_list] File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\stagesepx\cutter\cutter.py", line 164, in frame_list = [self._apply_hook(each) for each in frame_list] File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\stagesepx\cutter\cutter.py", line 66, in _apply_hook frame = eachhook.do(frame, *args, *kwargs) File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\stagesepx\hook.py", line 84, in do super().do(frame, , __) File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\stagesepx\hook.py", line 21, in do frame_id = frame.frame_id AttributeError: 'NoneType' object has no attribute 'frame_id'

williamfzc commented 2 years ago

https://github.com/williamfzc/stagesepx/issues/116#issuecomment-620468139 参考这里解决