We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d3906e commit 03c244bCopy full SHA for 03c244b
comtypes/__init__.py
@@ -4,7 +4,15 @@
4
import atexit
5
from ctypes import *
6
from ctypes import _SimpleCData
7
-from _ctypes import COMError
+try:
8
+ from _ctypes import COMError
9
+except ImportError as e:
10
+ msg = "\n".join((
11
+ "COM technology not available (maybe it's the wrong platform).",
12
+ "Note that COM is only supported on Windows.",
13
+ "For more details, please check: "
14
+ "https://learn.microsoft.com/en-us/windows/win32/com"))
15
+ raise ImportError(msg) from e
16
import logging
17
import os
18
import sys
0 commit comments