enthought / pyface

pyface: traits-capable windowing framework
Other
107 stars 55 forks source link

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

Open capn-freako opened 1 year ago

capn-freako commented 1 year ago

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

capn-freako commented 1 year ago

Fixes #1205

capn-freako commented 1 year ago

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 commented 1 year ago

Hi @corranwebster , can you approve the workflows?

Thanks! -db

capn-freako commented 1 year ago

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

Is this still of any interest?

Thanks, -db

christianbrodbeck commented 1 year ago

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

capn-freako commented 1 year ago

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

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

corranwebster commented 1 year ago

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

This looks useful, assuming tests pass I will merge.

corranwebster commented 1 year ago

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

capn-freako commented 12 months ago

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 commented 11 months ago

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 commented 11 months ago

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 commented 11 months ago

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 commented 11 months ago

Hi, I just got this notification on my own fork of PyFace: https://github.com/capn-freako/pyface/actions/runs/7216126167 https://github.com/capn-freako/pyface/actions/runs/7216126167

I’m assuming this is related, but not sure what to do about it. Can you get me pointed in the right direction?

Thanks, -db

On Dec 5, 2023, at 6:48 AM, Corran Webster @.***> wrote:

I'm being told I already have everything:

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

— Reply to this email directly, view it on GitHub https://github.com/enthought/pyface/pull/1230#issuecomment-1840634274, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH7XGXN4IXNDZLSN6PL6QDYH4CZRAVCNFSM6AAAAAAWMGVOSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBQGYZTIMRXGQ. You are receiving this because you authored the thread.