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

Fix pyqt6 loader on windows #1797

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Conversation

rchiodo
Copy link
Contributor

@rchiodo rchiodo commented Jan 6, 2025

Was testing matplotlib after a submission this morning and I needed this change for the QT backend to work.

@rchiodo rchiodo requested a review from a team as a code owner January 6, 2025 23:29
and submod_finder.find_spec("QtGui") is not None
and submod_finder.find_spec("QtSvg") is not None
)
try:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This code was trying to load PyQt4 twice, when PyQt4 doesn't even exist anymore (at least on windows)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If it fails to load the main module, it should just return False.

@rchiodo rchiodo merged commit 7597262 into microsoft:main Jan 7, 2025
22 of 24 checks passed
@rchiodo rchiodo deleted the rchiodo/fix_qt_backend branch January 7, 2025 17:49
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.

1 participant