@@ -188,7 +188,11 @@ def __init__(self, tk, context, engine_instance_name, env):
188
188
189
189
# Update the authentication module to use the engine's Qt.
190
190
# @todo: can this import be untangled? Code references internal part of the auth module
191
- from ..authentication .ui import qt_abstraction
191
+ try :
192
+ from ..authentication .ui import qt_abstraction
193
+ except ImportError :
194
+ class qt_abstraction :
195
+ pass
192
196
193
197
qt_abstraction .QtCore = qt .QtCore
194
198
qt_abstraction .QtGui = qt .QtGui
@@ -416,13 +420,13 @@ def __show_busy(self, title, details):
416
420
from .qt .busy_dialog import BusyDialog
417
421
from .qt import QtGui , QtCore
418
422
419
- except :
423
+ except ImportError as e :
420
424
# QT import failed. This may be because someone has upgraded the core
421
425
# to the latest but are still running a earlier version of the
422
426
# Shotgun or Shell engine where the self.has_ui method is not
423
427
# correctly implemented. In that case, absorb the error and
424
428
# emit a log message
425
- self .log_info ("[%s] %s" % (title , details ))
429
+ self .log_info ("[%s] %s: %s " % (title , details , e ))
426
430
427
431
else :
428
432
# our qt import worked!
@@ -2152,7 +2156,7 @@ def _define_qt_base(self):
2152
2156
2153
2157
:returns: dict
2154
2158
"""
2155
- base = {"qt_core" : None , "qt_gui" : None , "dialog_base" : None }
2159
+ base = {"qt_core" : None , "qt_gui" : None , "dialog_base" : None , "wrapper" : None }
2156
2160
try :
2157
2161
importer = QtImporter ()
2158
2162
base ["qt_core" ] = importer .QtCore
@@ -2162,11 +2166,11 @@ def _define_qt_base(self):
2162
2166
else :
2163
2167
base ["dialog_base" ] = None
2164
2168
base ["wrapper" ] = importer .binding
2165
- except :
2169
+ except ImportError :
2166
2170
2167
- self .log_exception (
2171
+ self .log_error (
2168
2172
"Default engine QT definition failed to find QT. "
2169
- "This may need to be subclassed. "
2173
+ "This may need to be subclassed"
2170
2174
)
2171
2175
2172
2176
return base
@@ -2182,7 +2186,11 @@ def __define_qt5_base(self):
2182
2186
2183
2187
:returns: A dictionary with all the modules, __version__ and __name__.
2184
2188
"""
2185
- return QtImporter (interface_version_requested = QtImporter .QT5 ).base
2189
+ try :
2190
+ return QtImporter (interface_version_requested = QtImporter .QT5 ).base
2191
+ except ImportError as e :
2192
+ self .log_debug (e )
2193
+ return {}
2186
2194
2187
2195
def __define_qt6_base (self ):
2188
2196
"""
0 commit comments