Skip to content

Added additional debugging output to pyface/qt/__init__.py.#1230

Merged
mdickinson merged 3 commits into
enthought:mainfrom
capn-freako:fix-issue-1205
May 16, 2025
Merged

Added additional debugging output to pyface/qt/__init__.py.#1230
mdickinson merged 3 commits into
enthought:mainfrom
capn-freako:fix-issue-1205

Conversation

@capn-freako

Copy link
Copy Markdown
Contributor

Responding to issue 1205, by adding some additional debugging output when importing a GUI backend fails.

@capn-freako

Copy link
Copy Markdown
Contributor Author

Fixes #1205

@capn-freako

Copy link
Copy Markdown
Contributor Author

Here is example output from the new code, in the case of import failure:

ImportError: Nothing found in sys.modules or os.environ.
Attempting to import...
Successfully imported PySide2
Failed to import QtCore; problem involved: C:\Users\Admin\miniconda3\envs\pybert\lib\site-packages\PySide2\QtCore.cp39-win_amd64.pyd.
Failed to import PySide6; problem involved: None.
Successfully imported PyQt5
Failed to import QtCore; problem involved: C:\Users\Admin\miniconda3\envs\pybert\lib\site-packages\PyQt5\QtCore.pyd.
Failed to import PyQt6; problem involved: None.
Failed to import PyQt4; problem involved: None.
Cannot import any of PySide2, PySide6, PyQt5, PyQt6, PyQt4

@capn-freako

Copy link
Copy Markdown
Contributor Author

Hi @corranwebster , can you approve the workflows?

Thanks!
-db

@capn-freako

Copy link
Copy Markdown
Contributor Author

Hi @rkern , @EdwinWiseOne , @stefanoborini , @christianbrodbeck , @corranwebster ,

Is this still of any interest?

Thanks,
-db

@christianbrodbeck

Copy link
Copy Markdown
Contributor

Looks to me like it could be helpful for debugging in some cases.

@capn-freako

Copy link
Copy Markdown
Contributor Author

Looks to me like it could be helpful for debugging in some cases.

Thanks, Christian!
Are you able to unblock the workflows?

@corranwebster

Copy link
Copy Markdown
Contributor

Apologies - I think I missed this back in March. Thanks for the contribution.

This looks useful, assuming tests pass I will merge.

@corranwebster

Copy link
Copy Markdown
Contributor

Test failures appear to be due to incompatibilities between Qt5 and the latest Pillow version, which is orthogonal to this PR.

@capn-freako

Copy link
Copy Markdown
Contributor Author

Test failures appear to be due to incompatibilities between Qt5 and the latest Pillow version, which is orthogonal to this PR.

So, do I have an action here?

@corranwebster

Copy link
Copy Markdown
Contributor

So, do I have an action here?

If you can merge in current main, that should like resolve the issue. I can possibly do it but won't have the spare cycles for at least a week.

@capn-freako

Copy link
Copy Markdown
Contributor Author

So, do I have an action here?

If you can merge in current main, that should like resolve the issue. I can possibly do it but won't have the spare cycles for at least a week.

I'm being told I already have everything:

% git status
On branch fix-issue-1205
Your branch is up to date with 'origin/fix-issue-1205'.

nothing to commit, working tree clean

% git merge upstream/main
Already up to date.

@corranwebster

Copy link
Copy Markdown
Contributor

I'm being told I already have everything:

Thanks. Then it's on me to sort out what's going on with the errors.

@capn-freako

capn-freako commented Dec 15, 2023 via email

Copy link
Copy Markdown
Contributor Author

@mdickinson mdickinson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like a clear improvement. Thank you for the PR!

@mdickinson mdickinson merged commit d654883 into enthought:main May 16, 2025
28 checks passed
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.

4 participants