Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Mac: Save button not working on 1.5.0 or 2.x with backend.qt4 in ipython 4 #5689

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

Closed
JCorson opened this issue Dec 17, 2015 · 20 comments
Closed
Assignees
Labels
Milestone

Comments

@JCorson
Copy link

JCorson commented Dec 17, 2015

When trying to save a figure in matplotlib 1.5.0 with backend:Qt4Agg and backend.qt4:PySide the save button is not functional. The save dialog opens and then immediately closes.

# Use %matplotlib to prevent segfault reported in issue #5687
%matplotlib 
import matplotlib.pyplot as plt
plt.plot(range(10))

Click the save button.
plt.savefig() still works.
I have been able to reproduce this behavior on Mac (OSX 10.11) in both Enthought and Anaconda's matplotlib 1.5.0.

@tacaswell tacaswell added this to the Critical bugfix release (1.5.1) milestone Dec 17, 2015
@tacaswell
Copy link
Member

just to confirm, this is a regression from 1.4.3?

@jdmarch
Copy link

jdmarch commented Dec 17, 2015

I can reproduce on 1.4.3

@tacaswell
Copy link
Member

ok, so not a regression.

This is tickling something in the back of my mind as having seen this before and it getting fixed, but details are not forth coming.

attn @mfitzp

@mdboom mdboom self-assigned this Dec 21, 2015
@mdboom
Copy link
Member

mdboom commented Dec 21, 2015

I can't seem to reproduce with Homebrew Python 2.7.11 and pyside. What Python are you using and how did you install PySide?

@mdboom
Copy link
Member

mdboom commented Dec 21, 2015

Nevermind, if I run in IPython, I can reproduce. Regular Python interpreter works, though.

@tacaswell
Copy link
Member

I wonder if this is related to the ipython inputhook?

On Mon, Dec 21, 2015, 16:43 Michael Droettboom [email protected]
wrote:

Nevermind, if I run in IPython, I can reproduce. Regular Python
interpreter works, though.


Reply to this email directly or view it on GitHub
#5689 (comment)
.

@mdboom
Copy link
Member

mdboom commented Dec 22, 2015

That's my suspicion, but I haven't had much time to look at it.

tacaswell added a commit that referenced this issue Dec 23, 2015
@mdboom
Copy link
Member

mdboom commented Dec 23, 2015

Sorry -- I think I introduced confusion by not being clear enough in the PR descriptions. d041565 doesn't fix this bug. This bug has to do with the save dialog displaying briefly. d041565 (and #5720) fix a bug that only happens after the user has had a chance to select a filename and begin drawing and saving the file. I've been poking at this bug without any success -- I think it's something pretty low-level in how the IPython input hook is set up, and (I think) used to work and recent PySide changes broke it.

@mdboom mdboom reopened this Dec 23, 2015
@tacaswell
Copy link
Member

sorry 🐑

@mdboom
Copy link
Member

mdboom commented Dec 23, 2015

No worries. It would be hard to know they were different from the descriptions alone.

@tacaswell tacaswell modified the milestones: next major release (2.0), Critical bugfix release (1.5.1) Jan 1, 2016
@tacaswell
Copy link
Member

Punting this to the 2.0 tag as it is not a regression and we probably need to pull in someone from IPython here.

@JCorson #5690 fixed the segfault, does this bug exist using the not-ipython-eventhook?

@JCorson
Copy link
Author

JCorson commented Jan 5, 2016

@tacaswell with #5690 patched, I have only been able to produce this bug when running ipython with %pylab or %matplotlib.

@tacaswell
Copy link
Member

@Carreau who is the right IPython person to ping about input hook + qt + pyside issues?

@Carreau
Copy link
Contributor

Carreau commented Jan 5, 2016

hum... I take my chance with @minrk that know all the things. I'll have a look too.

@tacaswell tacaswell modified the milestones: 2.0.1 (next bug fix release), 2.0 (style change major release) Jan 25, 2016
@efiring
Copy link
Member

efiring commented Jun 20, 2016

This is not a pyside-specific issue; I see it with an Anaconda installation using pyqt 4.11.4. @minrk, any chance you can look into this?

@tacaswell
Copy link
Member

I think this may be a OSX specific issue as well. It works correctly on linux.

@minrk
Copy link
Contributor

minrk commented Jun 20, 2016

I'll see what I can find out.

@tiagopereira
Copy link

I had this problem with both PySide and PyQt. However, updating to IPython 5.1.0 seems to solve the issue. Also improves the window redraw when resized on qt5.

@efiring efiring changed the title Mac: Save button not working on 1.5.0 with backend.qt4:PySide Mac: Save button not working on 1.5.0 or 2.x with backend.qt4 Dec 23, 2016
@efiring efiring changed the title Mac: Save button not working on 1.5.0 or 2.x with backend.qt4 Mac: Save button not working on 1.5.0 or 2.x with backend.qt4 in ipython 4 Dec 23, 2016
@efiring
Copy link
Member

efiring commented Dec 23, 2016

I can reproduce it using ipython with or without '--pylab' or any gui magic (plt.ion()), but not at the ordinary python prompt, where plt.ion() is now sufficient for interactivity. This is with ipython 4.0.3, so given the report above, it may be something we don't have to worry about, as newer ipython versions come into use.

@QuLogic QuLogic modified the milestones: 2.0.1 (next bug fix release), 2.0.2 (next bug fix release) May 3, 2017
@anntzer
Copy link
Contributor

anntzer commented Jun 29, 2017

Closing as the last report is that this is fixed with recent ipython versions. Feel free to reopen if still present with even more recent ipythons.

@anntzer anntzer closed this as completed Jun 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants