Using the simple server API

9 views
Skip to first unread message

Stefan

unread,
Dec 18, 2009, 11:53:33 AM12/18/09
to sage-support
Hi all,

I surfed through the discussion board and through the documentation on
trying to figure out how to get the simple server API up and running.
I made sure to run 'import sage.server.simple.twist' in my sage
prompt. Is there a way to easily test Sage to see if the API is
functioning such as entering the address into the address bar:

http://localhost:8000/simple/login?username=myusername&password=mypassword

I get the dreaded "Internal Server Error" message.

Thanks!

Robert Bradshaw

unread,
Dec 18, 2009, 2:17:34 PM12/18/09
to sage-s...@googlegroups.com
On Dec 18, 2009, at 8:53 AM, Stefan wrote:

> Hi all,
>
> I surfed through the discussion board and through the documentation on
> trying to figure out how to get the simple server API up and running.
> I made sure to run 'import sage.server.simple.twist' in my sage
> prompt. Is there a way to easily test Sage to see if the API is
> functioning such as entering the address into the address bar:

Yes, you should be able to do that. (See the example at the top of the
file.)

> http://localhost:8000/simple/login?username=myusername&password=mypassword
>
> I get the dreaded "Internal Server Error" message.

What does the terminal window where you started the notebook server say?

- Robert

Stefan

unread,
Dec 18, 2009, 2:58:18 PM12/18/09
to sage-support
Hi Robert,

Thanks for getting back to me. The error I'm getting is:

File "/sage/sage/local/lib/python2.6/site-packages/sagenb/simple/
twist.py", line 207, in render
U = notebook_twist.notebook.user(username)
exceptions.AttributeError: 'NoneType' object has no attribute 'user'

On Dec 18, 2:17 pm, Robert Bradshaw <rober...@math.washington.edu>
wrote:


> On Dec 18, 2009, at 8:53 AM, Stefan wrote:
>
> > Hi all,
>
> > I surfed through the discussion board and through the documentation on
> > trying to figure out how to get the simple server API up and running.
> > I made sure to run 'import sage.server.simple.twist' in my sage
> > prompt.  Is there a way to easily test Sage to see if the API is
> > functioning such as entering the address into the address bar:
>
> Yes, you should be able to do that. (See the example at the top of the  
> file.)
>

> >http://localhost:8000/simple/login?username=myusername&password=mypas...

William Stein

unread,
Dec 18, 2009, 2:59:54 PM12/18/09
to sage-support
On Fri, Dec 18, 2009 at 11:58 AM, Stefan <stefan.lo...@gmail.com> wrote:
> Hi Robert,
>
> Thanks for getting back to me.  The error I'm getting is:
>
> File "/sage/sage/local/lib/python2.6/site-packages/sagenb/simple/
> twist.py", line 207, in render
> U = notebook_twist.notebook.user(username)
> exceptions.AttributeError: 'NoneType' object has no attribute 'user'

This is probably somehow caused by the transition to the new notebook,
which is separated completely out from Sage, and which has undergone
many changes.

William

> On Dec 18, 2:17 pm, Robert Bradshaw <rober...@math.washington.edu>
> wrote:
>> On Dec 18, 2009, at 8:53 AM, Stefan wrote:
>>
>> > Hi all,
>>
>> > I surfed through the discussion board and through the documentation on
>> > trying to figure out how to get the simple server API up and running.
>> > I made sure to run 'import sage.server.simple.twist' in my sage
>> > prompt.  Is there a way to easily test Sage to see if the API is
>> > functioning such as entering the address into the address bar:
>>
>> Yes, you should be able to do that. (See the example at the top of the
>> file.)
>>
>> >http://localhost:8000/simple/login?username=myusername&password=mypas...
>>
>> > I get the dreaded "Internal Server Error" message.
>>
>> What does the terminal window where you started the notebook server say?
>>
>> - Robert
>

> --
> To post to this group, send email to sage-s...@googlegroups.com
> To unsubscribe from this group, send email to sage-support...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

Shing Hing Man

unread,
Dec 20, 2009, 2:20:13 PM12/20/09
to sage-support
I have just upgraded from Sage 4.0.2 to Sage 4.2.1 and have
encountered the same error mentioned by Stefan.
Is there a way to fix the problem ?

Thanks in advance of any assistance!
Shing

On Dec 18, 7:59 pm, William Stein <wst...@gmail.com> wrote:

> > For more options, visit this group athttp://groups.google.com/group/sage-support

Stefan

unread,
Jan 15, 2010, 4:35:18 PM1/15/10
to sage-support
William,

Do you know if anyone is actively maintaining this feature? I see
that it would be quite useful for various applications, so I'd like to
see it get resolved in one of the upcoming releases.

I'd be happy to chip away at the problem, but I'm relatively new to
the Sage community and might take me some time to get familiar with
the architecture.

Thanks!

On Dec 18 2009, 2:59 pm, William Stein <wst...@gmail.com> wrote:


> On Fri, Dec 18, 2009 at 11:58 AM, Stefan <stefan.louis.no...@gmail.com> wrote:
> > Hi Robert,
>
> > Thanks for getting back to me.  The error I'm getting is:
>
> > File "/sage/sage/local/lib/python2.6/site-packages/sagenb/simple/
> > twist.py", line 207, in render
> > U = notebook_twist.notebook.user(username)
> > exceptions.AttributeError: 'NoneType' object has no attribute 'user'
>
> This is probably somehow caused by the transition to the new notebook,
> which is separated completely out from Sage, and which has undergone
> many changes.
>
> William
>
>
>
> > On Dec 18, 2:17 pm, Robert Bradshaw <rober...@math.washington.edu>
> > wrote:
> >> On Dec 18, 2009, at 8:53 AM, Stefan wrote:
>
> >> > Hi all,
>
> >> > I surfed through the discussion board and through the documentation on

> >> > trying to figure out how to get thesimpleserver API up and running.


> >> > I made sure to run 'import sage.server.simple.twist' in my sage
> >> > prompt.  Is there a way to easily test Sage to see if the API is
> >> > functioning such as entering the address into the address bar:
>
> >> Yes, you should be able to do that. (See the example at the top of the
> >> file.)
>
> >> >http://localhost:8000/simple/login?username=myusername&password=mypas...
>
> >> > I get the dreaded "Internal Server Error" message.
>
> >> What does the terminal window where you started the notebook server say?
>
> >> - Robert
>
> > --
> > To post to this group, send email to sage-s...@googlegroups.com
> > To unsubscribe from this group, send email to sage-support...@googlegroups.com

> > For more options, visit this group athttp://groups.google.com/group/sage-support

William Stein

unread,
Jan 16, 2010, 2:40:44 AM1/16/10
to sage-support
2010/1/15 Stefan <stefan.lo...@gmail.com>:

> William,
>
> Do you know if anyone is actively maintaining this feature?  I see
> that it would be quite useful for various applications, so I'd like to
> see it get resolved in one of the upcoming releases.
>
> I'd be happy to chip away at the problem, but I'm relatively new to
> the Sage community and might take me some time to get familiar with
> the architecture.

We have a bug days workshop that starts tomorrow so we'll look then.

> For more options, visit this group at http://groups.google.com/group/sage-support

Reply all
Reply to author
Forward
0 new messages