-
Notifications
You must be signed in to change notification settings - Fork 949
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
output widget append_display_data does not display widgets #1811
Comments
From the docs http://ipython.readthedocs.io/en/stable/api/generated/IPython.core.formatters.html:
We use |
IPython 6.1 was released 31 May 2017. I think it will be a while before we can mandate IPython 6.1+ (likely not until ipywidgets 8), so we may just have to live with this for now. |
actually, we may be able to register a display using the |
Hi, I am experiencing a similar problem. In my case, the slider widget is displayed properly but the output widget cannot be displayed. Is there any temporary solution? Thank you very much! |
@GaiYu0, can you post the code you are using? |
It turns out that my problem was caused by broken dependencies, which is irrelevant from this issue. Sorry! |
This won't work. It looks like registering a So I'm moving this issue into the Major Release milestone, for when we can require ipython >=6.1 and define a |
It looks like IPython 6.1 was released May 31, 2017, so we should probably wait until at least June 2018 to make this change. |
Perhaps we can put in a check for the ipython version, and use the |
Note: Python allows you to conditionally declare methods, so no monkey-patching would be needed: In [1]: class A:
...: if True:
...: def sum(self, a, b):
...: return a + b
...:
In [2]: a = A()
In [3]: a.sum(5, 6)
Out[3]: 11
In [4]: class B:
...: if False:
...: def sum(self, a, b):
...: return a + b
...:
In [5]: b = B()
In [6]: b.sum(5, 6)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-6-b0fbaf787c6b> in <module>
----> 1 b.sum(5, 6)
AttributeError: 'B' object has no attribute 'sum' |
It seems there are some problems either with the output widget
append_display_data
method (from #1752), or how we display widgets.should capture the intslider inside of the output widget, but instead we get
If I use the output widget as a context manager, it works fine:
The text was updated successfully, but these errors were encountered: