Skip to content

Conversation

staceyoue
Copy link
Contributor

@staceyoue staceyoue commented Sep 15, 2025

  • The api module may fail to load due to incompatible Qt version between Alias and FPT (it is expected that they would have different Qt versions)
  • Instead of raising exception, set to the module to None
  • In some cases tk-framework-alias package needs to be imported, but does not require the api module, so let the caller still import and use the framework without the api module
  • This is a bit of a work around until the Alias api DLL does not create a Qt dependency

@staceyoue staceyoue requested a review from Copilot September 15, 2025 17:54
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the Alias Python API import handling to gracefully handle import failures instead of raising exceptions. The change allows the tk-framework-alias package to be imported even when the API module fails to load due to version incompatibilities between Alias and the Python environment.

  • Replace exception raising with warning message when API import fails
  • Set the api_module to None instead of crashing on import failure
  • Enhance error messaging to provide more detailed troubleshooting information

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@staceyoue staceyoue requested a review from a team September 15, 2025 18:14
* The api module may fail to load due to incompatible Qt version between Alias and FPT (it is expected that they would have different Qt versions)
* Instead of raising exception, set to the module to None
* In some cases tk-framework-alias package needs to be imported, but does not require the api module, so let the caller still import and use the framework without the api module
* This is a bit of a work around until the Alias api DLL does not create a Qt dependency
@staceyoue staceyoue force-pushed the SHOT-4558/fix-api-import branch from 2014077 to 6137f29 Compare September 15, 2025 18:20
@staceyoue staceyoue merged commit 2c167e6 into main Oct 2, 2025
14 checks passed
@staceyoue staceyoue deleted the SHOT-4558/fix-api-import branch October 2, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants