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

Figures plotting in local display #10580

Closed
nadnerbity opened this issue Feb 24, 2018 · 3 comments
Closed

Figures plotting in local display #10580

nadnerbity opened this issue Feb 24, 2018 · 3 comments

Comments

@nadnerbity
Copy link

Bug report

When I ssh -Y into a machine (Computer A) running OS X 10.11 figures are appearing on the display of Computer A, not on my machine (Computer B). I have tried multiple backends: QT4, QT5, Tk, Macosx. If I do not have a VNC connection to Computer A I am told that I cannot access the display (see below).

I can ssh to a red hat box (Computer C) and matplotlib opens figures on my machine (Computer B). Matplotlib functions fine on Computer B (no ssh). I don't think the problem is Computer B. I am suspicious that the topic discussed in the Stack Exchange Q is relevant: OS X doesn't support what I want to do.

Is it possible to have figures from Computer A display on Computer B, if Computer A runs OS X?

Code for reproduction

>>> import matplotlib
>>> matplotlib.use('tkagg')
>>> import matplotlib.pyplot as plt
>>> plt.figure(1)

Actual outcome

Feb 23 16:53:47  python[75277] <Error>: Set a breakpoint at CGSLogError to catch errors as they are logged.
Feb 23 16:53:47  python[75277] <Error>: This user is not allowed access to the window system right now.
Feb 23 16:53:47  python[75277] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Feb 23 16:53:47  python[75277] <Warning>: Invalid Connection ID 0
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
Feb 23 16:53:47  python[75277] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Feb 23 16:53:47  python[75277] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Feb 23 16:53:47  python[75277] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Feb 23 16:53:47  python[75277] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Feb 23 16:53:47  python[75277] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
<matplotlib.figure.Figure object at 0x1048bc1d0>
>>> Feb 23 16:53:48  python[75277] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Feb 23 16:53:48  python[75277] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Feb 23 16:53:48  python[75277] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
2018-02-23 16:53:48.009 Python[75277:6361567] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2018-02-23 16:53:48.009 Python[75277:6361567] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2018-02-23 16:53:48.009 Python[75277:6361567] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2018-02-23 16:53:48.010 Python[75277:6361567] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
Feb 23 16:53:48  python[75277] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Feb 23 16:53:48  python[75277] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Feb 23 16:53:48  python[75277] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Feb 23 16:53:48  python[75277] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Feb 23 16:54:03  python[75277] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Feb 23 16:54:03  python[75277] <Warning>: Invalid Connection ID 0
Feb 23 16:54:03  python[75277] <Error>: CGSCopySpaces: No connection with id 0x       0
Feb 23 16:54:03  python[75277] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Feb 23 16:54:03  python[75277] <Warning>: Invalid Connection ID 0
Feb 23 16:54:03  python[75277] <Error>: CGSCopySpaces: No connection with id 0x       0

Expected outcome
A figure on Computer B.

Matplotlib version

  • Operating system: OS X 10.11.??
  • Matplotlib version: 2.1.2
  • Matplotlib backend (print(matplotlib.get_backend())): TkAgg
  • Python version: Python 2.7.10 (default, Oct 23 2015, 19:19:21)
  • Jupyter version (if applicable): I dunno, I don't use it.
  • Other libraries:

This appears to be the system version of python. I did try using macports and homebrew installations and had the same problem.

@jklymak
Copy link
Member

jklymak commented Feb 24, 2018

This is a better question for stackexchange or mailing list. I’ll close but feel free to reopen if you think this is a matpltolib bug.

@jklymak jklymak closed this as completed Feb 24, 2018
@nadnerbity
Copy link
Author

nadnerbity commented Feb 24, 2018

I am having trouble figuring out what the problem is because other X11 things, like xeyes, do work. I am totally lost as to how to find the answer to this.

I suppose it isn't a matplotlib problem because if I try to open a PyQt4 window I get the same error:

from PyQt4 import QtGui
app = QtGui.QApplication(sys.argv)
Feb 23 17:19:26  python[75997] <Error>: Set a breakpoint at CGSLogError to catch errors as they are logged.
Feb 23 17:19:26  python[75997] <Error>: This user is not allowed access to the window system right now.

@nadnerbity
Copy link
Author

In case someone finds this closed issue, I solved my problem. I posted the answer to stackoverflow.

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

No branches or pull requests

2 participants