From de8a58f0d7e2ca5cc9e4b7966d6a7d6201118b0b Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 8 Jun 2022 09:50:44 +0200 Subject: [PATCH] Fix imports, especially not using plugins folder as module When running from source, 'import plugins' works since it's working from the directory where the plug-ins directory is located. However in a build this doesn't work since the source code is in a different location there. --- plugins/Marketplace/InstallMissingPackagesDialog.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/Marketplace/InstallMissingPackagesDialog.py b/plugins/Marketplace/InstallMissingPackagesDialog.py index 282dc54492..bd7c08d9b9 100644 --- a/plugins/Marketplace/InstallMissingPackagesDialog.py +++ b/plugins/Marketplace/InstallMissingPackagesDialog.py @@ -1,16 +1,17 @@ +# Copyright (c) 2022 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + import os -from PyQt6.QtCore import QObject, pyqtSignal, pyqtProperty, QUrl -from PyQt6.QtGui import QDesktopServices +from PyQt6.QtCore import QObject, pyqtSignal, pyqtProperty from typing import Optional, List, Dict, cast, Callable from cura.CuraApplication import CuraApplication from UM.PluginRegistry import PluginRegistry from cura.CuraPackageManager import CuraPackageManager -from UM.Message import Message from UM.i18n import i18nCatalog from UM.FlameProfiler import pyqtSlot -from plugins.Marketplace.MissingPackageList import MissingPackageList +from .MissingPackageList import MissingPackageList i18n_catalog = i18nCatalog("cura")