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

repr_html exception warning on qtconsole with pandas #4745 #4792

Closed
ghost opened this issue Jan 13, 2014 · 5 comments · Fixed by #4832
Closed

repr_html exception warning on qtconsole with pandas #4745 #4792

ghost opened this issue Jan 13, 2014 · 5 comments · Fixed by #4832
Milestone

Comments

@ghost
Copy link

ghost commented Jan 13, 2014

#4745 - warn on failed formatter calls

since qtconsole html output is limited, pandas choses to provide an
html repr on ipnb only and raise an exception from _repr_html_ when in qtconsole to fallback
to a text repr. This used to work fine, but #4745 now results in a warning message constantly
being emitted about the exception being raised.

@minrk, how about supressing a NotImplementedError as a form of contract?

@minrk
Copy link
Member

minrk commented Jan 20, 2014

There is already an official way to communicate no output - returning None. We can add support for NotImplementedError (and/or NotImplemented), but it would be redundant.

minrk added a commit to minrk/ipython that referenced this issue Jan 20, 2014
@minrk
Copy link
Member

minrk commented Jan 20, 2014

#4832 should prevent warning on NotImplementedError

@ghost
Copy link
Author

ghost commented Jan 20, 2014

Thanks.

I was not aware of None being a signal, tested it now and it works just fine.
I'll modify pandas to return None, but honoring NotImplementedError as well
makes sense to me.

Until now we raised ValueError which normally should cause a warning, so now
all previous versions of pandas will emit one at every step.

IPython.utils.warn does not actually delegate to the python warning module, so it's
not possible to supress these in a standard way. Is there an IPython way we can
suggest to users?

@minrk
Copy link
Member

minrk commented Jan 20, 2014

utils.warn is little more than a shortcut for sys.stderr, so there's no good way to suppress it. I've switched it to a real warning in #4832, so you should be able to suppress IPython.core.formatters.FormatterWarning.

@ghost
Copy link
Author

ghost commented Jan 20, 2014

#4832 tested and resolves the issue, I'll add a mention in the pandas docs. Thanks for the quick fix.

@minrk minrk added this to the 2.0 milestone Mar 26, 2014
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
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 a pull request may close this issue.

1 participant