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 bugs with pyexists and qt path #34

Merged
merged 1 commit into from
May 31, 2024

Conversation

jjstickel
Copy link
Contributor

@jjstickel jjstickel commented Dec 22, 2023

On my system (MacOS with macports-installed julia and python), PythonPlot was not picking up an appropriate gui backend. It took some sleuthing to determine why, but I discovered that pyimport("importlib") would sometimes not include util as an attribute. This PR fixes that problem, and also adds output of the error in the gui-detection try block to help with any future bugs that might arise there.

I also include in this PR a change to comment out fixqtpath() as it does not seem to work properly, as also reported in #17. I have not spent time chasing this one down. This change enables Qt5 backend on my system, even without specifying ENV["QT_PLUGIN_PATH"].

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (main@fe588f4). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #34   +/-   ##
=======================================
  Coverage        ?   19.51%           
=======================================
  Files           ?        5           
  Lines           ?      451           
  Branches        ?        0           
=======================================
  Hits            ?       88           
  Misses          ?      363           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

fixqtpath()
# `fixqtpath()` seems to not be working,
# https://github.com/JuliaPy/PythonPlot.jl/issues/17
#fixqtpath()
Copy link
Member

Choose a reason for hiding this comment

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

It is it not working, or not necessary? What is the downside of keeping this function call (which may still be needed on some systems)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It somehow breaks the Qt5 backend for me, and apparently others as described in #17 . It isn't necessary for me; I don't even need to set QT_PLUGIN_PATH. After spending a few hours debugging the first problem, I didn't take time to investigate what is going here with qt path.

@ufechner7
Copy link

Any chance to get this merged, or what is missing?

@jjstickel
Copy link
Contributor Author

Bump. I was hoping to share code with colleagues that uses PythonPlot, and it would be easier if this is merged.

@stevengj stevengj merged commit 476e896 into JuliaPy:main May 31, 2024
6 checks passed
@jjstickel jjstickel deleted the gui_detect_fixes branch June 4, 2024 14:46
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