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
Installed qt5 event loop hook. #14006
Comments
I think this is due to #13957. An option to disable these debug messages would be nice, since I do not need to be reminded of the event loop on every startup. |
I agree with @nodatapoints , I would like to suppress the message |
@shaperilio, how do you think we should address this issue? |
Is there a global "debug" flag? The print statements were added precisely because silent failures were happening before; i.e. you run something which is forcing a Happy to help make this quieter, and maybe work on something that allows multiple event loop hooks to run in sequence, which I believe should be possible as well. |
I think the problem is that Matplotlib sets the Qt backend by default in some cases, which generates this message in IPython when users try to set that backend again. So, perhaps the message shouldn't be shown when the backend you're trying to set is the same one that you already have. |
This was certainly the intent. Let me take a look at what's going on. @forallsunday can you post relevant package versions? |
I run IPython 8.12.0 with Qt5 on Gentoo. In my configuration I set |
What is |
It's the IPython config object. See here for more details: |
OK, I reproduced this with a config file containing only
and a virtualenv containing only My intent is to make an effort to ignore multiple requests for the same GUI event loop, but keep all the messaging. If lots of people are against that, maybe we can add a |
I think ignoring warnings for the same event loop is fine for now. |
OK, there's a bit of a mess here with Qt versions. When IPython starts, the profile configuration is read. After the banner is printed, The user, in this case, has set This, via a call to Note that this call comes from trying to retrieve the value So, for both Windows and Linux, this would be This causes At the very end of the call to
I see a discrepancy here: If The reverse mapping from backend->GUI has modifications:
I don't follow these. If there are specifically versioned backends, and the Qt imports on both Note that this all happens before actually processing whatever the user set This entire sequence is being triggered by importing (This is more of a note to self; let me think about this more and see how we can proceed.) |
@tacaswell do you have any thoughts on the backend<->GUI mapping? |
There is a winding road to get here and I am not sure I have all of the details correct, but my rough understanding is:
I think the course of action here should be:
I'll open this PR. This is closely related to #14038 |
Thanks @tacaswell; I'll need some time to process your comment. In the meantime, I've started a draft pull request. The messaging is improved (that's the easy part) but I left a comment there because importing |
I'm 75% sure that is something that needs to be resolved in the inline backend. |
The other thing to check is that the default backend in Matplotlib in now "auto", however if you ask Matplotlib what the current backend is or create a figure we will sort out what the best currently available backend is. If you have any of the Qt bindings installed, we will pick that (as interactive figures are better than dead figures). https://matplotlib.org/stable/users/explain/backends.html#selecting-a-backend
I do not see |
This is exactly what and that last line will go through the list mentioned in the docs. So yes, it seems that |
OK, #14067 implements what I think we should do. I think it needs to wait to see what we hear from |
I created a PR for this in Now |
I just wrote up #14089; maybe we can take the choice away from users who don't really care? Especially with this Qt version stuff, I wonder if we support it just because the code is there and not because most people actually need it. |
Should take care of ipython#14006, at least partially.
Should take care of ipython#14006, at least partially.
Should take care of #14006, at least partially.
When I use
plt.show()
, and run the script,❯ & D:/Anaconda3/python.exe -m IPython --no-autoindent d:/Documents/C-Project/GeoLocOptim/scripts/estimate.py
The following message showed:
What does it mean and how to disable this?
The text was updated successfully, but these errors were encountered: