Skip to content

Commit 504fa4f

Browse files
authored
[Fix] Use ImportError to cover ModuleNotFoundError raised by opencv-python (#1438)
1 parent 85c0976 commit 504fa4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mmengine/utils/dl_utils/collect_env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def collect_env():
138138
try:
139139
import cv2
140140
env_info['OpenCV'] = cv2.__version__
141-
except ModuleNotFoundError:
141+
except ImportError:
142142
pass
143143

144144
env_info['MMEngine'] = mmengine.__version__

0 commit comments

Comments
 (0)