Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Standalone SageMath do not work as SingleCell

I downloaded SageMath VM for Windows from sagemath
If I try an interact example:

          @interact
          def _(n=slider(1,20, step_size=1)):
               print(factorial(n))

it does not work unless I do first:

          from sagenb.notebook.interact import *

what is nowhere in the documentation by the way. Even so, I need to call the function first:

          _()

(if the function has a plot only then the plot is shown) but the controls (sliders, inputbox, etc) don't show in HTML. But if I use the exact same code on SageMathCell it works.
Why cant I get the interact work in my local SageMath?

Standalone Interact in standalone SageMath do not work as SingleCellSageMathCell

I downloaded SageMath VM for Windows from sagemath
If I try an interact example:

          @interact
          def _(n=slider(1,20, step_size=1)):
               print(factorial(n))

it does not work unless I do first:

          from

     from sagenb.notebook.interact import *

what is nowhere in the documentation by the way. Even so, I need to call the function first:

          _()

(if

     _()

I get the function has a plot only then error:

TypeError
Traceback (most recent call last) <ipython-input-65-02a00410cc9d> in <module>() ----> 1 _()

<ipython-input-64-067de41a741b> in _(n) 1 @interact 2 def _(n=slider(Integer(1),Integer(20), step_size=Integer(1))): ----> 3 print(factorial(n))

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.GinacFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:9536)() 819 (0, Integer Ring) 820 """ --> 821 res = super(GinacFunction, self).__call__(args, *kwds) 822 823 # Convert to Integer if the plot output was of type "int" and any of

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:11161)() 970 res = self._evalf_try_(*args) 971 if res is shown) but the controls (sliders, inputbox, etc) don't show None: --> 972 res = super(BuiltinFunction, self).__call__( 973 *args, coerce=coerce, hold=hold) 974

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:6754)() 469 if callable(method): 470 return method() --> 471 raise TypeError("cannot coerce arguments: %s" % (err)) 472 473 else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from <type 'instance'=""> to Symbolic Ring

But in HTML. But if I use the exact same code on SageMathCell it works.
Why cant I get the interact work in my local SageMath?

If I change print(factorial(n)) for print(type(n)) when I call _() I get:

     <type 'instance'>

Again If I just call print(n) I get:

     Slider: None [1--|1|---20]

I understand that this means

Interact in standalone SageMath do not work as SageMathCell

I downloaded SageMath VM for Windows from sagemath
If I try an interact example:

          @interact
          def _(n=slider(1,20, step_size=1)):
               print(factorial(n))

it does not work unless I do first:

     from sagenb.notebook.interact import *

what is nowhere in the documentation by the way. Even so, I need to call the function first:

     _()

I get the error:

TypeError
Traceback (most recent call last) <ipython-input-65-02a00410cc9d> in <module>() ----> 1 _()

<ipython-input-64-067de41a741b> in _(n) 1 @interact 2 def _(n=slider(Integer(1),Integer(20), step_size=Integer(1))): ----> 3 print(factorial(n))

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.GinacFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:9536)() 819 (0, Integer Ring) 820 """ --> 821 res = super(GinacFunction, self).__call__(args, *kwds) 822 823 # Convert to Integer if the output was of type "int" and any of

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:11161)() 970 res = self._evalf_try_(*args) 971 if res is None: --> 972 res = super(BuiltinFunction, self).__call__( 973 *args, coerce=coerce, hold=hold) 974

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:6754)() 469 if callable(method): 470 return method() --> 471 raise TypeError("cannot coerce arguments: %s" % (err)) 472 473 else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from <type 'instance'=""> to Symbolic Ring

But in SageMathCell it works.

If I change print(factorial(n)) for print(type(n)) when I call _() I get:

     <type 'instance'>

Again If I just call print(n) I get:

     Slider: None [1--|1|---20]

I understand that this means

Interact in standalone SageMath do not work as SageMathCell

I downloaded SageMath VM for Windows from sagemath
If I try an interact example:

          @interact
          def _(n=slider(1,20, step_size=1)):
               print(factorial(n))

it does not work unless I do first:

     from sagenb.notebook.interact import *

what is nowhere in the documentation by the way. Even so, I need to call the function first:

     _()

I get the error:

TypeError
Traceback (most recent call last) <ipython-input-65-02a00410cc9d> in <module>() ----> 1 _()

<ipython-input-64-067de41a741b> in _(n) 1 @interact 2 def _(n=slider(Integer(1),Integer(20), step_size=Integer(1))): ----> 3 print(factorial(n))

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.GinacFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:9536)() 819 (0, Integer Ring) 820 """ --> 821 res = super(GinacFunction, self).__call__(args, *kwds) 822 823 # Convert to Integer if the output was of type "int" and any of

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:11161)() 970 res = self._evalf_try_(*args) 971 if res is None: --> 972 res = super(BuiltinFunction, self).__call__( 973 *args, coerce=coerce, hold=hold) 974

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:6754)() 469 if callable(method): 470 return method() --> 471 raise TypeError("cannot coerce arguments: %s" % (err)) 472 473 else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from <type 'instance'=""> to Symbolic Ring

But in SageMathCell it works.

If I change print(factorial(n)) for print(type(n)) when I call _() I get:

     <type 'instance'>

Again If I just call print(n) I get:

     Slider: None [1--|1|---20]

I understand that this meansmeans that n (the slider) is not a number. But again in SageMathCell it works.

Interact in standalone SageMath do not work as SageMathCell

I downloaded SageMath VM for Windows from sagemath
If I try an interact example:

          @interact

@interact
          def def _(n=slider(1,20, step_size=1)):
               print(factorial(n))

     print(factorial(n))

it does not work unless I do first:

     from sagenb.notebook.interact import *

what is nowhere in the documentation by the way. Even so, I need to call the function first:

     _()

I get the error:

TypeError
Traceback (most recent call last) <ipython-input-65-02a00410cc9d> in <module>() ----> 1 _()

<ipython-input-64-067de41a741b> in _(n) 1 @interact 2 def _(n=slider(Integer(1),Integer(20), step_size=Integer(1))): ----> 3 print(factorial(n))

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.GinacFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:9536)() 819 (0, Integer Ring) 820 """ --> 821 res = super(GinacFunction, self).__call__(args, *kwds) 822 823 # Convert to Integer if the output was of type "int" and any of

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:11161)() 970 res = self._evalf_try_(*args) 971 if res is None: --> 972 res = super(BuiltinFunction, self).__call__( 973 *args, coerce=coerce, hold=hold) 974

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:6754)() 469 if callable(method): 470 return method() --> 471 raise TypeError("cannot coerce arguments: %s" % (err)) 472 473 else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from <type 'instance'=""> to Symbolic Ring

But in SageMathCell it works.

If I change print(factorial(n)) for print(type(n)) when I call _() I get:

     <type 'instance'>

Again If I just call print(n) I get:

     Slider: None [1--|1|---20]

I understand that this means that n (the slider) is not a number. But again in SageMathCell it works.

Interact in standalone SageMath do not work as SageMathCell

I downloaded SageMath VM for Windows from sagemath
If I try an interact example:

@interact
def _(n=slider(1,20, step_size=1)):
     print(factorial(n))

it does not work unless I do first:

     from sagenb.notebook.interact import *

what is nowhere in the documentation by the way. Even so, I need to call the function first:first (what in SageMathCell is not needed):

     _()

I get the error:

TypeError
Traceback (most recent call last) <ipython-input-65-02a00410cc9d> in <module>() ----> 1 _()

<ipython-input-64-067de41a741b> in _(n) 1 @interact 2 def _(n=slider(Integer(1),Integer(20), step_size=Integer(1))): ----> 3 print(factorial(n))

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.GinacFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:9536)() 819 (0, Integer Ring) 820 """ --> 821 res = super(GinacFunction, self).__call__(args, *kwds) 822 823 # Convert to Integer if the output was of type "int" and any of

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:11161)() 970 res = self._evalf_try_(*args) 971 if res is None: --> 972 res = super(BuiltinFunction, self).__call__( 973 *args, coerce=coerce, hold=hold) 974

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:6754)() 469 if callable(method): 470 return method() --> 471 raise TypeError("cannot coerce arguments: %s" % (err)) 472 473 else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from <type 'instance'=""> to Symbolic Ring

But in SageMathCell it works.

If I change print(factorial(n)) for print(type(n)) when I call _() I get:

     <type 'instance'>

Again If I just call print(n) I get:

     Slider: None [1--|1|---20]

I understand that this means that n (the slider) is not a number. But again in SageMathCell it works.

Interact in standalone SageMath do not work as SageMathCell

I downloaded SageMath VM for Windows from sagemath
If I try an interact example:

@interact
def _(n=slider(1,20, step_size=1)):
     print(factorial(n))

it does not work unless I do first:

     from sagenb.notebook.interact import *

what is nowhere in the documentation by the way. Even so, I need to call the function first (what in SageMathCell is not needed):

     _()

I get the error:

TypeError
Traceback (most recent call last) <ipython-input-65-02a00410cc9d> in <module>() ----> 1 _()

<ipython-input-64-067de41a741b> in _(n) 1 @interact 2 def _(n=slider(Integer(1),Integer(20), step_size=Integer(1))): ----> 3 print(factorial(n))

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.GinacFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:9536)() 819 (0, Integer Ring) 820 """ --> 821 res = super(GinacFunction, self).__call__(args, *kwds) 822 823 # Convert to Integer if the output was of type "int" and any of

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:11161)() 970 res = self._evalf_try_(*args) 971 if res is None: --> 972 res = super(BuiltinFunction, self).__call__( 973 *args, coerce=coerce, hold=hold) 974

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:6754)() 469 if callable(method): 470 return method() --> 471 raise TypeError("cannot coerce arguments: %s" % (err)) 472 473 else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from <type 'instance'=""> to Symbolic Ring

But in SageMathCell it works.

If I change print(factorial(n)) for print(type(n)) when I call _() I get:

     <type 'instance'>

Again If I just call print(n) I get:

     Slider: None [1--|1|---20]

I understand that this means that n (the slider) is not a number. But again in SageMathCell it works.

UPDATE:

I am using Sage-7.2-ova virtual machine image for Windows (a dedicated CentOS machine) (unfortunately I have no karma to post links) in a Windows 10 VM under VMware Workstation 12. Player.

The machine has an integrated Chromium browser, the VM is completely off the shelf, just open the OVA and the machine is running. The only configs I did is for the keyboard (ABNT2 BR) and to access the web server from the host; but the error was there before all that.

And the error is not about the browser, the interpreter obviously do not accept the commands, the stack trace is very consistent about that, as the SageMathCell site (no links again because of my karma) was a different version (at least on the interact package).

Interact in standalone SageMath do not work as SageMathCell

I downloaded SageMath VM for Windows from sagemath
If I try an interact example:

@interact
def _(n=slider(1,20, step_size=1)):
     print(factorial(n))

it does not work unless I do first:

     from sagenb.notebook.interact import *

what is nowhere in the documentation by the way. Even so, I need to call the function first (what in SageMathCell is not needed):

     _()

I get the error:

TypeError
Traceback (most recent call last) <ipython-input-65-02a00410cc9d> in <module>() ----> 1 _()

<ipython-input-64-067de41a741b> in _(n) 1 @interact 2 def _(n=slider(Integer(1),Integer(20), step_size=Integer(1))): ----> 3 print(factorial(n))

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.GinacFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:9536)() 819 (0, Integer Ring) 820 """ --> 821 res = super(GinacFunction, self).__call__(args, *kwds) 822 823 # Convert to Integer if the output was of type "int" and any of

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:11161)() 970 res = self._evalf_try_(*args) 971 if res is None: --> 972 res = super(BuiltinFunction, self).__call__( 973 *args, coerce=coerce, hold=hold) 974

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:6754)() 469 if callable(method): 470 return method() --> 471 raise TypeError("cannot coerce arguments: %s" % (err)) 472 473 else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from <type 'instance'=""> to Symbolic Ring

But in SageMathCell it works.

If I change print(factorial(n)) for print(type(n)) when I call _() I get:

     <type 'instance'>

Again If I just call print(n) I get:

     Slider: None [1--|1|---20]

I understand that this means that n (the slider) is not a number. But again in SageMathCell it works.

UPDATE:

I am using Sage-7.2-ova virtual machine image for Windows (a dedicated CentOS machine) (unfortunately I have no karma to post links) in a Windows 10 VM under VMware Workstation 12. Player.

The machine has an integrated Chromium browser, the VM is completely off the shelf, just open the OVA and the machine is running. The only configs I did is for werefor the keyboard (ABNT2 BR) and to access the web server from the host; but the error was there before all that.

And the error is not about the browser, the interpreter obviously do not accept the commands, the stack trace is very consistent about that, as the SageMathCell site (no links again because of my karma) was a different version (at least on the interact package).

Interact in standalone SageMath do not work as SageMathCell

I downloaded SageMath VM for Windows from sagemath
If I try an interact example:

@interact
def _(n=slider(1,20, step_size=1)):
     print(factorial(n))

it does not work unless I do first:

     from sagenb.notebook.interact import *

what is nowhere in the documentation by the way. Even so, I need to call the function first (what in SageMathCell is not needed):

     _()

I get the error:

TypeError
Traceback (most recent call last) <ipython-input-65-02a00410cc9d> in <module>() ----> 1 _()

<ipython-input-64-067de41a741b> in _(n) 1 @interact 2 def _(n=slider(Integer(1),Integer(20), step_size=Integer(1))): ----> 3 print(factorial(n))

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.GinacFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:9536)() 819 (0, Integer Ring) 820 """ --> 821 res = super(GinacFunction, self).__call__(args, *kwds) 822 823 # Convert to Integer if the output was of type "int" and any of

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:11161)() 970 res = self._evalf_try_(*args) 971 if res is None: --> 972 res = super(BuiltinFunction, self).__call__( 973 *args, coerce=coerce, hold=hold) 974

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:6754)() 469 if callable(method): 470 return method() --> 471 raise TypeError("cannot coerce arguments: %s" % (err)) 472 473 else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from <type 'instance'=""> to Symbolic Ring

But in SageMathCell it works.

If I change print(factorial(n)) for print(type(n)) when I call _() I get:

     <type 'instance'>

Again If I just call print(n) I get:

     Slider: None [1--|1|---20]

I understand that this means that n (the slider) is not a number. But again in SageMathCell it works.

UPDATE:

I am using Sage-7.2-ova virtual machine image for Windows (a dedicated CentOS machine) (unfortunately I have no karma to post links) in a Windows 10 VM under VMware Workstation 12. Player.

The machine has an integrated Chromium browser, the VM is completely off the shelf, just open the OVA and the machine is running. The only configs I did werefor were for the keyboard (ABNT2 BR) and to access the web server from the host; but the error was there before all that.

And the error is not about the browser, the interpreter obviously do not accept the commands, the stack trace is very consistent about that, as the SageMathCell site (no links again because of my karma) was a different version (at least on the interact package).

Interact in standalone SageMath do not work as SageMathCell

I downloaded SageMath VM for Windows from sagemath
If I try an interact example:

@interact
def _(n=slider(1,20, step_size=1)):
     print(factorial(n))

it does not work unless I do first:

     from sagenb.notebook.interact import *

what is nowhere in the documentation by the way. Even so, I need to call the function first (what in SageMathCell is not needed):

     _()

I get the error:

TypeError
Traceback (most recent call last) <ipython-input-65-02a00410cc9d> in <module>() ----> 1 _()

<ipython-input-64-067de41a741b> in _(n) 1 @interact 2 def _(n=slider(Integer(1),Integer(20), step_size=Integer(1))): ----> 3 print(factorial(n))

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.GinacFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:9536)() 819 (0, Integer Ring) 820 """ --> 821 res = super(GinacFunction, self).__call__(args, *kwds) 822 823 # Convert to Integer if the output was of type "int" and any of

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:11161)() 970 res = self._evalf_try_(*args) 971 if res is None: --> 972 res = super(BuiltinFunction, self).__call__( 973 *args, coerce=coerce, hold=hold) 974

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:6754)() 469 if callable(method): 470 return method() --> 471 raise TypeError("cannot coerce arguments: %s" % (err)) 472 473 else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from <type 'instance'=""> to Symbolic Ring

But in SageMathCell it works.

If I change print(factorial(n)) for print(type(n)) when I call _() I get:

     <type 'instance'>

Again If I just call print(n) I get:

     Slider: None [1--|1|---20]

I understand that this means that n (the slider) is not a number. But again in SageMathCell it works.

UPDATE:

I am using Sage-7.2-ova virtual machine image for Windows (a dedicated CentOS machine) (unfortunately I have no karma to post links) in a Windows 10 VM under VMware Workstation 12. Player.

The machine has an integrated Chromium browser, the VM is completely off the shelf, just open the OVA and the machine is running. The only configs I did were for the keyboard (ABNT2 BR) and to access the web server from the host; but the error was there before all that.

And the error is not about the browser, the interpreter obviously do not accept the commands, the stack trace is very consistent about that, as the SageMathCell site (no links again because of my karma) was a different version (at least on the interact package).

IMPORTANT: I am not using sage on command line. I am using on Sage Notebook on Jupyter via browser (not using aPython kernel, but Sage 7.2 kernel), by clicking New Notebook.

Interact in standalone SageMath do not work as SageMathCell

I downloaded SageMath VM for Windows from sagemath
If I try an interact example:

@interact
def _(n=slider(1,20, step_size=1)):
     print(factorial(n))

it does not work unless I do first:

     from sagenb.notebook.interact import *

what is nowhere in the documentation by the way. Even so, I need to call the function first (what in SageMathCell is not needed):

     _()

I get the error:

TypeError
Traceback (most recent call last) <ipython-input-65-02a00410cc9d> in <module>() ----> 1 _()

<ipython-input-64-067de41a741b> in _(n) 1 @interact 2 def _(n=slider(Integer(1),Integer(20), step_size=Integer(1))): ----> 3 print(factorial(n))

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.GinacFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:9536)() 819 (0, Integer Ring) 820 """ --> 821 res = super(GinacFunction, self).__call__(args, *kwds) 822 823 # Convert to Integer if the output was of type "int" and any of

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:11161)() 970 res = self._evalf_try_(*args) 971 if res is None: --> 972 res = super(BuiltinFunction, self).__call__( 973 *args, coerce=coerce, hold=hold) 974

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:6754)() 469 if callable(method): 470 return method() --> 471 raise TypeError("cannot coerce arguments: %s" % (err)) 472 473 else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from <type 'instance'=""> to Symbolic Ring

But in SageMathCell it works.

If I change print(factorial(n)) for print(type(n)) when I call _() I get:

     <type 'instance'>

Again If I just call print(n) I get:

     Slider: None [1--|1|---20]

I understand that this means that n (the slider) is not a number. But again in SageMathCell it works.

UPDATE:

I am using Sage-7.2-ova virtual machine image for Windows (a dedicated CentOS machine) (unfortunately I have no karma to post links) in a Windows 10 VM under VMware Workstation 12. Player.

The machine has an integrated Chromium browser, the VM is completely off the shelf, just open the OVA and the machine is running. The only configs I did were for the keyboard (ABNT2 BR) and to access the web server from the host; but the error was there before all that.

And the error is not about the browser, the interpreter obviously do not accept the commands, the stack trace is very consistent about that, as the SageMathCell site (no links again because of my karma) was a different version (at least on the interact package).

IMPORTANT:

I am not using sage on command line. I am using on Sage Notebook on Jupyter via browser (not using aPython kernel, but Sage 7.2 kernel), by clicking New Notebook.

On command the line I have the exact same behavior.

Interact in standalone SageMath do not work as SageMathCell

I downloaded SageMath VM for Windows from sagemath
If I try an interact example:

@interact
def _(n=slider(1,20, step_size=1)):
     print(factorial(n))

it does not work unless I do first:

     from sagenb.notebook.interact import *

what is nowhere in the documentation by the way. Even so, I need to call the function first (what in SageMathCell is not needed):

     _()

I get the error:

TypeError
Traceback (most recent call last) <ipython-input-65-02a00410cc9d> in <module>() ----> 1 _()

<ipython-input-64-067de41a741b> in _(n) 1 @interact 2 def _(n=slider(Integer(1),Integer(20), step_size=Integer(1))): ----> 3 print(factorial(n))

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.GinacFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:9536)() 819 (0, Integer Ring) 820 """ --> 821 res = super(GinacFunction, self).__call__(args, *kwds) 822 823 # Convert to Integer if the output was of type "int" and any of

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:11161)() 970 res = self._evalf_try_(*args) 971 if res is None: --> 972 res = super(BuiltinFunction, self).__call__( 973 *args, coerce=coerce, hold=hold) 974

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:6754)() 469 if callable(method): 470 return method() --> 471 raise TypeError("cannot coerce arguments: %s" % (err)) 472 473 else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from <type 'instance'=""> to Symbolic Ring

But in SageMathCell it works.

If I change print(factorial(n)) for print(type(n)) when I call _() I get:

     <type 'instance'>

Again If I just call print(n) I get:

     Slider: None [1--|1|---20]

I understand that this means that n (the slider) is not a number. But again in SageMathCell it works.

UPDATE:

I am using Sage-7.2-ova virtual machine image for Windows (a dedicated CentOS machine) (unfortunately I have no karma to post links) in a Windows 10 VM under VMware Workstation 12. Player.

The machine has an integrated Chromium browser, the VM is completely off the shelf, just open the OVA and the machine is running. The only configs I did were for the keyboard (ABNT2 BR) and to access the web server from the host; but the error was there before all that.

And the error is not about the browser, the interpreter obviously do not accept the commands, the stack trace is very consistent about that, as the SageMathCell site (no links again because of my karma) was a different version (at least on the interact package).

IMPORTANT:

I am not using sage on command line. I am using on Sage Notebook on Jupyter via browser (not using aPython kernel, but Sage 7.2 kernel), by clicking New Notebook.

On command the line I have the exact same behavior.

Interact in standalone SageMath do not work as SageMathCell

I downloaded SageMath VM for Windows from sagemath
If I try an interact example:

@interact
def _(n=slider(1,20, step_size=1)):
     print(factorial(n))

it does not work unless I do first:

     from sagenb.notebook.interact import *

what is nowhere in the documentation by the way. Even so, I need to call the function first (what in SageMathCell is not needed):

     _()

I get the error:

TypeError
Traceback (most recent call last) <ipython-input-65-02a00410cc9d> in <module>() ----> 1 _()

<ipython-input-64-067de41a741b> in _(n) 1 @interact 2 def _(n=slider(Integer(1),Integer(20), step_size=Integer(1))): ----> 3 print(factorial(n))

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.GinacFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:9536)() 819 (0, Integer Ring) 820 """ --> 821 res = super(GinacFunction, self).__call__(args, *kwds) 822 823 # Convert to Integer if the output was of type "int" and any of

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:11161)() 970 res = self._evalf_try_(*args) 971 if res is None: --> 972 res = super(BuiltinFunction, self).__call__( 973 *args, coerce=coerce, hold=hold) 974

/home/sage/sage-7.2/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (/home/sage/sage-7.2/src/build/cythonized/sage/symbolic/function.cpp:6754)() 469 if callable(method): 470 return method() --> 471 raise TypeError("cannot coerce arguments: %s" % (err)) 472 473 else: # coerce == False

TypeError: cannot coerce arguments: no canonical coercion from <type 'instance'=""> to Symbolic Ring

But in SageMathCell it works.

If I change print(factorial(n)) for print(type(n)) when I call _() I get:

     <type 'instance'>

Again If I just call print(n) I get:

     Slider: None [1--|1|---20]

I understand that this means that n (the slider) is not a number. But again in SageMathCell it works.

UPDATE:

I am using Sage-7.2-ova virtual machine image for Windows (a dedicated CentOS machine) (unfortunately I have no karma to post links) in a Windows 10 VM under VMware Workstation 12. Player.

The machine has an integrated Chromium browser, the VM is completely off the shelf, just open the OVA and the machine is running. The only configs I did were were: * for the keyboard (ABNT2 BR) and BR); * to access the web server from the host; * to install VMWare tools and get a shared folder with the host

but the error was there before all that.

And the error is not about the browser, the interpreter obviously do not accept the commands, the stack trace is very consistent about that, as the SageMathCell site (no links again because of my karma) was a different version (at least on the interact package).

IMPORTANT:

I am not using sage on command line. I am using on Sage Notebook on Jupyter via browser (not using aPython kernel, but Sage 7.2 kernel), by clicking New Notebook.

On command the line I have the exact same behavior.