From 480bf982fc27fd440c8a252ca9cfca8fbdf908c7 Mon Sep 17 00:00:00 2001 From: Felix <> Date: Fri, 21 Mar 2025 21:33:08 +0100 Subject: [PATCH] fixed problem with pywintypes.com_error pywintypes.com_error -2147221020 --- dronecan_gui_tool/setup_window.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dronecan_gui_tool/setup_window.py b/dronecan_gui_tool/setup_window.py index b1f5bc5..227eedf 100644 --- a/dronecan_gui_tool/setup_window.py +++ b/dronecan_gui_tool/setup_window.py @@ -117,6 +117,11 @@ def list_ifaces(): try: if sys.platform != 'darwin': from can import detect_available_configs + try: + import pythoncom + pythoncom.CoInitialize() + except Exception: + pass for interface in detect_available_configs(): if interface['interface'] == "pcan": out[interface['channel']] = interface['channel']