Skip to content

no good error message on missing tkinter and %paste #1736

Closed
juliantaylor opened this Issue May 14, 2012 · 4 comments

3 participants

@juliantaylor

running %paste without tkinter installed on an ubuntu 12.04 machine just outputs:

ERROR: Could not get text from the clipboard.

wheras it should output

Getting text from the clipboard on this platform requires Tkinter.

somewhere while bubbling up the TryNext exception the message gets lost

@takluyver
IPython member

I played with that recently, I'll look into it.

@bfroehle

Short answer: IPython.core.hooks.clipboard_get uses CommandChainDispatcher which discards the error message in it's __call__ method.

Either we need to also propagate _msg in CommandChainDispatcher, or tkinter_clipboard_get should raise an error which is not TryNext.

See also #211.

@takluyver takluyver added a commit to takluyver/ipython that referenced this issue May 15, 2012
@takluyver takluyver Display message from TryNext error in magic_paste
Closes gh-1736
2d2f2f7
@takluyver
IPython member

Should be done in #1741

@bfroehle bfroehle added a commit to bfroehle/ipython that referenced this issue Jun 7, 2012
@bfroehle bfroehle Remove args/kwargs handling in TryNext.
This allows the error message in magic_paste to propagate correctly,
closing gh-1736.
189ff13
@takluyver
IPython member

Fixed by PR #1850.

@takluyver takluyver closed this Jun 7, 2012
@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
@bfroehle bfroehle Remove args/kwargs handling in TryNext.
This allows the error message in magic_paste to propagate correctly,
closing gh-1736.
2bd62d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.