Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions python/shotgun_desktop/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ def __init__(self, reason, toolkit_path):
)


class EngineNotCompatibleWithDesktop16(ShotgunDesktopError):
class EngineNotCompatibleWithDesktop(ShotgunDesktopError):
def __init__(self, app_version):
super().__init__(
"Your version of tk-desktop is not compatible with this PTR desktop app {}.\n"
"Your version of tk-desktop is not compatible with this FlowPT Desktop {}.\n"
"\n"
"Please upgrade your site configuration's tk-desktop to v2.5.9+ or "
"download PTR desktop app 1.5.9 or earlier <a href='{}'>here</a>".format(
"Please upgrade your site configuration's tk-desktop to v2.5.9+ or " ## TODO change
"download FlowPT desktop v1.XXX5.9 or earlier <a href='{}'>here</a>".format( # OK but wrong info since unsupported....
app_version,
"https://community.shotgridsoftware.com/t/a-new-version-of-shotgrid-desktop-has-been-released/13877/99999",
"https://community.shotgridsoftware.com/t/13877",
Comment on lines +142 to +147
)
)
37 changes: 7 additions & 30 deletions python/shotgun_desktop/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def init_sgtk_logger():
ShotgunDesktopError,
RequestRestartException,
UpgradeEngine200Error,
EngineNotCompatibleWithDesktop16,
EngineNotCompatibleWithDesktop,
UpgradeCoreError,
UpgradeCorePython3Error,
InvalidPipelineConfiguration,
Expand Down Expand Up @@ -452,14 +452,7 @@ def __launch_app(app, splash, user, app_bootstrap, settings):
"python/tk_desktop/".replace("/", os.path.sep)
in deepest.tb_frame.f_code.co_filename
):
raise EngineNotCompatibleWithDesktop16(app_bootstrap.get_version())
raise
except Exception as e:
# We may end up here when running with an older version of core pre 0.19.
# If we are running a pre 0.19 version of core and we are using Python 3
# Then we will likely hit an error: ModuleNotFoundError: No module named 'Cookie'
if "No module named 'Cookie'" in e.args:
raise UpgradeCorePython3Error()
raise EngineNotCompatibleWithDesktop(app_bootstrap.get_version())
raise

return __post_bootstrap_engine(splash, app_bootstrap, engine, settings)
Expand Down Expand Up @@ -620,25 +613,9 @@ def __post_bootstrap_engine(splash, app_bootstrap, engine, settings):
# doesn't include browser integration, so we'll launch it ourselves.
server = None

try:
return _run_engine(
engine, splash, startup_version, app_bootstrap, startup_desc, settings
)
except TypeError as e:
# When running in Python 3 mode and launching into tk-desktop 2.5.0, the engine
# does support PySide2, but the engine doesn't yet support Python 3 fully and the gui
# can't initialize, so a TypeError will be launched by qRegisterResourceData.
# So catch it, and let the user know that this error is due to missing Python3
# support for the engine.
if sys.version_info[0] != 3:
raise
if (
"PySide2.QtCore.qRegisterResourceData' called with wrong argument types"
in str(e)
):
raise EngineNotCompatibleWithDesktop16(app_bootstrap.get_version())
raise

return _run_engine(
engine, splash, startup_version, app_bootstrap, startup_desc, settings
)

def __ensure_engine_compatible_with_qt_version(engine, app_version):
"""
Expand All @@ -663,8 +640,8 @@ def __ensure_engine_compatible_with_qt_version(engine, app_version):
return

# Versions of desktop older than v2.5.0 have issues with desktop 1.6.1+, so raise an error.
if is_version_newer_or_equal(app_version, "v1.6.1"):
raise EngineNotCompatibleWithDesktop16(app_version)
if is_version_newer_or_equal(app_version, "v1.8.0"):
raise EngineNotCompatibleWithDesktop(app_version)


def _is_pipeline_config_disabled(error_message):
Expand Down
Loading