zhoubolei / moments_models

The pretrained models trained on Moments in Time Dataset
BSD 2-Clause "Simplified" License
355 stars 68 forks source link

test_video.py - AttributeError: 'NoneType' object has no attribute 'groups' #12

Open inspired27 opened 6 years ago

inspired27 commented 6 years ago

Hi,

I am trying to inference against a test video /test_1.mp4 and I am getting the following error any idea I am running on Windows, Anaconda, Python 3.6, Pytorch 0.3.0 etc. The test_model.py works but not video.

(momentsintime) C:\Users\Pablo\moments_models>python test_video.py --video_file /test_1.mp4 Extracting frames using ffmpeg... Traceback (most recent call last): File "test_video.py", line 120, in frames = extract_frames(args.video_file, args.num_segments) File "test_video.py", line 50, in extract_frames duration = re_duration.search(str(output[1])).groups()[0] AttributeError: 'NoneType' object has no attribute 'groups'

595448755 commented 5 years ago

I falling the same error.

root@AI-K3-U18-c9n742-01:/ai/moments_models# python3 test_video.py --video_file path/to/video.mp4 --arch resnet50 Extracting frames using ffmpeg... Traceback (most recent call last): File "test_video.py", line 61, in frames = extract_frames(args.video_file, args.num_segments) File "/ai/moments_models/utils.py", line 22, in extract_frames duration = re_duration.search(str(output[1])).groups()[0] AttributeError: 'NoneType' object has no attribute 'groups'

mtufano commented 1 year ago

Same here. Any updates?

Extracting frames using ffmpeg... Traceback (most recent call last): File "C:\Users\tufan001\OneDrive - Wageningen University & Research\PycharmProjects\TimeSeries\keypoints_paper\analysis\Pretrained_models\Moments\moments_models\test_video.py", line 62, in frames = extract_frames(args.video_file, args.num_segments) File "C:\Users\tufan001\OneDrive - Wageningen University & Research\PycharmProjects\TimeSeries\keypoints_paper\analysis\Pretrained_models\Moments\moments_models\utils.py", line 22, in extract_frames duration = re_duration.search(str(output[1])).groups()[0] AttributeError: 'NoneType' object has no attribute 'groups' ​