diff --git a/remote_gui/remote_gui.py b/remote_gui/remote_gui.py index 8f0005a..657ba90 100644 --- a/remote_gui/remote_gui.py +++ b/remote_gui/remote_gui.py @@ -21,7 +21,7 @@ # pylint: disable=wrong-import-position,import-error import sys import gi -import pkg_resources +import importlib.resources import subprocess import threading import typing @@ -43,8 +43,10 @@ def __init__(self, **properties): # load objects self.builder: Gtk.Builder = Gtk.Builder() - self.builder.add_from_file(pkg_resources.resource_filename( - __name__, 'remote_gui.glade')) + glade_ref = importlib.resources.files( + __name__).joinpath('remote_gui.glade') + with importlib.resources.as_file(glade_ref) as path: + self.builder.add_from_file(str(path)) # ask window self.ask_window: AskWindow = AskWindow(