On Sunday, October 23, 2016 at 1:03:13 PM UTC-4, [email protected] wrote:
>
> Hi the @interact command no longer seems to be working in Sage 7.3 and 
> Sage 7.4 on an Mac Book Pro running El Capitan:
>
> Here is the contents I entered in an "Jupyter" notebook cell which I 
> copied from a Sage interact example:
>
> -----------------------------------------------------------------------------------
> Contents of the sage 7.4 notebook cell:
> from ipywidgets import interact, interactive, fixed
> import ipywidgets as widgets
>
>
> @interact(num=5)
> def square(num=2):
>     print "{} squared is {}".format(num, num*num)
>
> --------------------------------------------------------------------------------------------
>
> Here is the error output: displayed in the output cell:
>
> ------------------------------------------------------------------------------------------------------
> Traceback (most recent call last): print "{} squared is {}".format(num,
> num*num) File "", line 1, in <module> File
> "/private/var/folders/31/r_2f8ryd5ks7xb80nyrbj2cc0000gn/T/tmprIbuu6/___c
> \ ode___.py", line 8, in <module> def square(num=_sage_const_2 ): File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/ipywidgets/widgets/interaction.py", line 360, in dec
> return interact(f, **kwargs) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/ipywidgets/widgets/interaction.py", line 343, in
> interact w = interactive(f, **kwargs) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/ipywidgets/widgets/interaction.py", line 203, in
> interactive container = Box(_dom_classes=['widget-interact']) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/ipywidgets/widgets/widget_box.py", line 44, in
> __init__ super(Box, self).__init__(**kwargs) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/ipywidgets/widgets/domwidget.py", line 90, in
> __init__ super(DOMWidget, self).__init__(*pargs, **kwargs) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/ipywidgets/widgets/widget.py", line 184, in __init__
> self.open() File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/ipywidgets/widgets/widget.py", line 197, in open
> state, buffer_keys, buffers =
> self._split_state_buffers(self.get_state()) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/ipywidgets/widgets/widget.py", line 291, in
> get_state value = to_json(getattr(self, k), self) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/traitlets/traitlets.py", line 529, in __get__ return
> self.get(obj, cls) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/traitlets/traitlets.py", line 508, in get value =
> self._validate(obj, dynamic_default()) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/ipywidgets/widgets/domwidget.py", line 23, in
> _layout_default return Layout() File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/ipywidgets/widgets/widget.py", line 184, in __init__
> self.open() File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/ipywidgets/widgets/widget.py", line 203, in open
> self.comm = Comm(**args) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/ipykernel/comm/comm.py", line 63, in __init__
> self.open(data=data, metadata=metadata, buffers=buffers) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/ipykernel/comm/comm.py", line 94, in open
> comm_manager = getattr(self.kernel, 'comm_manager', None) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/traitlets/traitlets.py", line 529, in __get__ return
> self.get(obj, cls) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/traitlets/traitlets.py", line 508, in get value =
> self._validate(obj, dynamic_default()) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/traitlets/traitlets.py", line 564, in _validate
> value = self.validate(obj, value) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/traitlets/traitlets.py", line 1589, in validate
> self.error(obj, value) File
> "/Applications/SageMath-7.4.app/Contents/Resources/sage/local/lib/python
> \ 2.7/site-packages/traitlets/traitlets.py", line 1436, in error raise
> TraitError(e) traitlets.traitlets.TraitError: The 'kernel' trait of a
> Comm instance must be a Kernel, but a value of type 'NoneType' (i.e.
> None) was specified.
>
>
> ----------------------------------------------------------------------------------------------------------------
>
> Any ideas?
>
> Regards,
>
> Adam Hausknecht
> Department of Mathematics
> UMass Dartmouth
>
>
>  Thanks for the answers!

However,  I still have the following questions:

1. How do you set SageMath 7.4 App so that it automatically starts up the 
Jupyter notebook?
 
    Even after renaming .sage, SageMath 7.4 App still opens using the old 
sage notebook and I need to use the command
    line to force the SageMath 7.4 App to open a Jupyter notebook. Also, 
even when SageMath 7.4 App opens the
    old sage notebook, the "Jupyter" item is checked in the menu displayed 
at the top of the screen. Why?

2. In the future will the SageMath Jupyter notebook have the same menus & 
buttons as the old sage notebook?


Regards,

Adam Hausknecht
Department of Mathematics
UMass Dartmouth

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to