Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

does sage server API work in 5.10?

I am trying to run a simple notebook server to use API described here and here

I run the following code in sage command line:

sage:version()

'Sage Version 5.10, Release Date: 2013-06-17'

sage: from sagenb.notebook.notebook_object import test_notebook                                     
sage: passwd = str(randint(1,1<<128))                                                               
sage: nb = test_notebook(passwd, secure=False, interface='localhost', port=Integer(9000), verbose=True, directory=None)

Instead of running server, I get the following:


AttributeError                            Traceback (most recent call last)
<ipython-input-8-6fc45872bdcd> in <module>()
----> 1 nb = test_notebook(passwd, secure=False, interface='localhost', port=Integer(9000), verbose=True,directory=None)

/opt/sage/devel/sagenb/sagenb/notebook/notebook_object.pyc in test_notebook(admin_passwd, secure, directory, port, interface, verbose)
    266 
    267     nb = _notebook.load_notebook(directory)
--> 268     nb.set_accounts(True)
    269     nb.add_user('admin', admin_passwd, '')
    270     nb.set_accounts(False)
AttributeError: 'Notebook' object has no attribute 'set_accounts'

I have also tried to connect to a "normal" sage server created by notebook() via 'simple' URL:

http://localhost:8080/simple/login?username=admin&password=%s

which returns error 404

Does the sage server API work in sage 5.10? Is there a workaround how to create such server? Is there any other way to execute some sage code remotely?