From 70a79b248c519ed076514aead0c77517c6c0278f Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Thu, 28 Sep 2023 19:10:22 -0500 Subject: [PATCH] Address import error for Python 3.7 --- foqus_lib/gui/main/mainWindow.py | 2 +- setup.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/foqus_lib/gui/main/mainWindow.py b/foqus_lib/gui/main/mainWindow.py index 19fcc08a5..92083603c 100644 --- a/foqus_lib/gui/main/mainWindow.py +++ b/foqus_lib/gui/main/mainWindow.py @@ -61,7 +61,7 @@ try: from importlib import metadata -except ModuleNotFoundError: +except ImportError: import importlib_metadata as metadata from typing import Dict from types import ModuleType diff --git a/setup.py b/setup.py index b4999cf58..afc6ee5c5 100644 --- a/setup.py +++ b/setup.py @@ -118,6 +118,7 @@ "TurbineClient ~= 4.0, >= 4.0.3", "winshell; sys_platform == 'win32'", "websocket_client>=1.1.0", + "importlib_metadata; python_version < '3.8'", ], )