Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Failed to load Qt6 dll in compatibility+ version on Win7 #6985

Open
nbeliy opened this issue Nov 27, 2024 · 3 comments
Open

[Bug]: Failed to load Qt6 dll in compatibility+ version on Win7 #6985

nbeliy opened this issue Nov 27, 2024 · 3 comments
Labels
🐞 bug Issue describes a bug (crash or error) or undefined behavior.

Comments

@nbeliy
Copy link

nbeliy commented Nov 27, 2024

PsychoPy Version

2024.2.4 compatibility+ (py3.8)

What OS are your PsychoPy running on?

Windows7

Bug Description

Dear developers,
We had some difficulties for running psychopy 2024.2.4 compatibility+ on Windows7 machine (unfortunately we are forced to use this machine).

When running the task script, we got an error during the import of QtCore (psychopy\gui\qtgui.py, line 19):

ImportError: DLL load failed while importing QtCore: The specified procedure could not be found.

Strangely, the Psychopy GUI working without issue, only the task causes a problem.

Expected Behaviour

Well, Qt loads correctly without error)

Steps to Reproduce

  1. Install compatibility+ version on windows7 machine
  2. Run a task script
  3. Observe an error

Additional context

From a quick inspection, the problem is related to Qt version. When we removed Qt6 from imputOrder list (line 15), the error disappeared. But I guess, adding ImportError to the except will be more general solution.

Better solution would be to fix the installation of pyQt6 for windows, but I'm not sure if it even possible.

@nbeliy nbeliy added the 🐞 bug Issue describes a bug (crash or error) or undefined behavior. label Nov 27, 2024
@peircej
Copy link
Member

peircej commented Nov 27, 2024

Are you directly importing psychopy.gui.qtgui, instead of just psychopy.gui? The latter is designed so that if Qt gives an import error it should silently fall back to wxpython for the dialog (which would explain your comment "the Psychopy GUI working without issue")

If Qt6 is now incompatible with Win7 I'm not sure what we'd be able to do to fix that btu if using wx gets around the problem I think we'll mark this as "won't fix"

@nbeliy
Copy link
Author

nbeliy commented Nov 27, 2024

Hi @peircej ,

The GUI in script is imported in standard way:

from psychopy import sound, gui, visual, <...>

To my knowledge, task script was created with GUI, and have standard imports.

Could it be a conflict between different versions of psychopy? We have several stand-alone versions of psychopy. For example script is run with python from standalone installations, but uses the libraries from different installation (or maybe default path)?

If Qt6 is now incompatible with Win7 I'm not sure what we'd be able to do to fix that btu if using wx gets around the problem I think we'll mark this as "won't fix"

I would prefer that you add ImportError to a except in qtgui.py, but our fix is quite easy, so I'm ok if you ignore that bug. I doubt there a lot of people that uses Win7 with several installations of psychopy.

@peircej
Copy link
Member

peircej commented Nov 27, 2024

OK, I now see what you mean about ImportError. It's because currently we only have ModuleNotFound error. So in your case the module is found but fails to import and that isn't trapped.

Sure, I think it's fine to make that change. Feel free to submit a pull request 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Issue describes a bug (crash or error) or undefined behavior.
Projects
None yet
Development

No branches or pull requests

2 participants