Install Qt Binding hook installs PySide2 on Windows for Python 3.11+

Open Beginner friendly
#46 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
desktop, devtools

Research direction

Start in client/ayon_equalizer/hooks/pre_install_qt_bindings.py, following the Windows call to install_pyside_windows() and its parameters near the lines cited in the issue. Compare it with install_pyside() on Linux and macOS. Pass the selected binding through the Windows install path, then confirm the hook uses PySide6 for Python 3.11 or newer and PySide2 for older versions.

Written by the indexing model from the issue text.

Description

type: bug

Problem

The Install Qt Binding launch hook always installs PySide2 on Windows, even when the Python of 3DE is 3.11 or newer and the hook itself decided that PySide6 is needed.

The hook picks the binding from the Python version:

https://github.com/ynput/ayon-equalizer/blob/0c027d01fbc9cdc62312ca848542ee2a62548c17/client/ayon_equalizer/hooks/pre_install_qt_bindings.py#L117-L119

and checks for that binding:

https://github.com/ynput/ayon-equalizer/blob/0c027d01fbc9cdc62312ca848542ee2a62548c17/client/ayon_equalizer/hooks/pre_install_qt_bindings.py#L122

On Linux and macOS, pyside_name is passed on to the install:

https://github.com/ynput/ayon-equalizer/blob/0c027d01fbc9cdc62312ca848542ee2a62548c17/client/ayon_equalizer/hooks/pre_install_qt_bindings.py#L131

On Windows, install_pyside_windows() doesn't get pyside_name:

https://github.com/ynput/ayon-equalizer/blob/0c027d01fbc9cdc62312ca848542ee2a62548c17/client/ayon_equalizer/hooks/pre_install_qt_bindings.py#L129

and installs PySide2 unconditionally:

https://github.com/ynput/ayon-equalizer/blob/0c027d01fbc9cdc62312ca848542ee2a62548c17/client/ayon_equalizer/hooks/pre_install_qt_bindings.py#L173

Expected

With 3DE Python 3.11 or newer on Windows, the hook installs PySide6, as it does on Linux and macOS.

Actual (from reading the code)

  • PySide2 has no wheels for Python 3.11 and newer, so the pip install fails, or installs a binding the AYON tools don't use.
  • The next launch checks for PySide6 again, finds it missing, and asks for administrator rights again, on every launch.

Suggested fix

Pass pyside_name to install_pyside_windows() and use it in parameters, like install_pyside() does.

Found in 0.2.3 (0c027d0); develop has the same code.

Dominant language
Python
Stars
3
Forks
9
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ynput/ayon-equalizer

All issues in ynput/ayon-equalizer

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.