Skip to content

Commit afef7df

Browse files
committed
adding the warning on unsucessful import
1 parent 0fc157d commit afef7df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

torchvision/io/_video_opt.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
torch.ops.load_library(ext_specs.origin)
2727
_HAS_VIDEO_OPT = True
2828
except (ImportError, OSError):
29-
pass
29+
warnings.warn("Could not import video_reader bakcend."
30+
+ " Make sure ffmpeg is installed properly"
31+
+ " and rebuild torchvision.")
3032

3133

3234
default_timebase = Fraction(0, 1)

0 commit comments

Comments
 (0)