http://flask.sagenb.org -- test it!!!

60 views
Skip to first unread message

William Stein

unread,
Mar 25, 2011, 10:03:27 PM3/25/11
to sage-devel, sage-notebook, bugdays
Hi,

Please find bugs in http://flask.sagenb.org. Is it slow? Fast?
Broken in *any* way at all?

This is the result of a huge amount of awesome work of Rado Kirov and
Mike Hansen and many, many others.

There is exactly one known bug -- JMOL 3d graphics do not work at all.

This is running *multithreaded* so it may actually be vastly more
scalable than the previous notebook... some testing has suggested
this.

-- William

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

William Stein

unread,
Mar 25, 2011, 10:04:22 PM3/25/11
to sage-devel, sage-notebook, bugdays
Quick followup: Thanks to work of Rado, http://flask.sagenb.org
supports OpenID, so everybody can just login instantly without
bothering to make an account...

Harald Schilly

unread,
Mar 25, 2011, 10:17:45 PM3/25/11
to sage-n...@googlegroups.com, William Stein, sage-devel, bugdays
On Sat, Mar 26, 2011 at 03:03, William Stein <wst...@gmail.com> wrote:
> Broken in *any* way at all?

very cool, works more or less just like it is locally over here!

I also ran that silly code:

s = 0
for i in xrange(1e9):
s = i
print s

after about 10-20 secs nothing happened, and selecting "interrupt" it
told me that i cannot be interrupted (red box, top right). But
anyways, then it worked fine and has fully "recovered" ;)

+1 for openid support!

H

Jason Grout

unread,
Mar 25, 2011, 10:25:20 PM3/25/11
to sage-...@googlegroups.com
On 3/25/11 7:03 PM, William Stein wrote:
> Hi,
>
> Please find bugs in http://flask.sagenb.org. Is it slow? Fast?
> Broken in *any* way at all?


Jmol doesn't work, as far as we can tell. We aren't sure why, though.
Kudos to whoever can figure out why jmol isn't working!

It seems that the jmol applet loads, but it can't find the file
containing the jmol instructions, for some reason. It may be that what
we really should do is just port the new jmol patch up on trac to work
on this new server.

And congrats to Mike, Rado, the many testers, and others who got this
all working! It will be *much* easier to understand and modify the
notebook code after we migrate to this.

Thanks,

Jason

kcrisman

unread,
Mar 25, 2011, 10:38:47 PM3/25/11
to sage-devel


On Mar 25, 10:25 pm, Jason Grout <jason-s...@creativetrax.com> wrote:
> On 3/25/11 7:03 PM, William Stein wrote:
>
> > Hi,
>
> > Please find bugs inhttp://flask.sagenb.org.  Is it slow?  Fast?
> > Broken in *any* way at all?
>
> Jmol doesn't work, as far as we can tell.  We aren't sure why, though.
> Kudos to whoever can figure out why jmol isn't working!
>
> It seems that the jmol applet loads, but it can't find the file
> containing the jmol instructions, for some reason.  It may be that what
> we really should do is just port the new jmol patch up on trac to work
> on this new server.

Can you post the details on this? I assume you get the 'zapped'
thing; what is the error message? If it smells anything like what
Jonathan was able to fix on the normal server, hopefully that will
make all well.

- kcrisman

mhampton

unread,
Mar 25, 2011, 11:16:32 PM3/25/11
to sage-devel
Seems very nice so far, I've tried running some @parallel stuff,
interacts, notebook cython cells. No problems so far and it seems
pretty fast.

-Marshall

On Mar 25, 9:04 pm, William Stein <wst...@gmail.com> wrote:
> Quick followup:  Thanks to work of Rado,http://flask.sagenb.org
> supports OpenID, so everybody can just login instantly without
> bothering to make an account...
>
>
>
> On Fri, Mar 25, 2011 at 7:03 PM, William Stein <wst...@gmail.com> wrote:
> > Hi,
>
> > Please find bugs inhttp://flask.sagenb.org.  Is it slow?  Fast?

John H Palmieri

unread,
Mar 26, 2011, 12:45:22 AM3/26/11
to sage-n...@googlegroups.com, sage-devel, bugdays
Looks really nice in limited testing.  One thing: when I first go the the flask.sagenb.org page, I see the "Username" box, and right next to it is a message "Error: Username is not in the system", although I never entered anything in that box.

--
John

Simon King

unread,
Mar 26, 2011, 3:12:35 AM3/26/11
to sage-devel
Hi!

On 26 Mrz., 03:03, William Stein <wst...@gmail.com> wrote:
> Please find bugs inhttp://flask.sagenb.org.  Is it slow?  Fast?
> Broken in *any* way at all?

Is there any way to interrupt a computation? When I do <Ctrl>-c,
nothing happens (no KeyboardInterrupt), and I don't see an "interrupt"
button.

Cheers,
Simon

Juanlu001

unread,
Mar 26, 2011, 5:42:13 AM3/26/11
to sage-devel
Just one silly bug, but when at first I open the page, I see "Error:
Username is not in the system" and "Error: Wrong password" in the
login form.

By the way, is https://code.google.com/r/rkirov-flask/ the source code
of this notebook? Should we test it locally in addition?

On Mar 26, 3:04 am, William Stein <wst...@gmail.com> wrote:
> Quick followup:  Thanks to work of Rado,http://flask.sagenb.org
> supports OpenID, so everybody can just login instantly without
> bothering to make an account...
>
>
>
>
>
>
>
>
>
> On Fri, Mar 25, 2011 at 7:03 PM, William Stein <wst...@gmail.com> wrote:
> > Hi,
>
> > Please find bugs inhttp://flask.sagenb.org.  Is it slow?  Fast?

Rado

unread,
Mar 26, 2011, 7:37:08 AM3/26/11
to sage-devel
> By the way, ishttps://code.google.com/r/rkirov-flask/the source code
> of this notebook? Should we test it locally in addition?

Yes, thats the repository that has the version that is currently
served at flask.sagemath.org. Local testing is welcome too, let me
know if there are issues with the installation instructions.

Juanlu001

unread,
Mar 26, 2011, 8:24:38 AM3/26/11
to sage-devel
It seems to me that @interact plots in published worksheets don't work
(in fact, I just don't know if they have ever worked, I have never
published a worksheet)

Jason Grout's test worksheet shows it: http://flask.sagenb.org/home/pub/0/

On Mar 26, 3:03 am, William Stein <wst...@gmail.com> wrote:
> Hi,
>
> Please find bugs inhttp://flask.sagenb.org.  Is it slow?  Fast?

Florent Hivert

unread,
Mar 26, 2011, 7:42:04 AM3/26/11
to sage-...@googlegroups.com
Hi There,

> +1 for openid support!

+1 too, but with one slight problem: I connected using my google id and now my
username is something like "openidXisFhSuwsA" moreover it stay as such when in
published my worksheet. I'd rather have my real name here if technically
possible.

Nice work guys. I also have one question:

In my university, we have a local notebook server (the university policy
forbid to have it public) which I use for teaching. On this server account are
for the moment created by a python script by the sysadmin but he is planning
to work on a LDAP connection. Will there be any change on that part on the
notebook server ? Should I refrain him to work on it now until the new flask
is out ?

Cheers,

Florent

mhampton

unread,
Mar 26, 2011, 10:44:32 AM3/26/11
to sage-devel
No, they don't work currently in published worksheets. That would be
a tricky security issue to solve (but it would be very nice!).

-M. Hampton

Paulo César Pereira de Andrade

unread,
Mar 26, 2011, 10:49:15 AM3/26/11
to sage-...@googlegroups.com, Jason Grout
2011/3/25 Jason Grout <jason...@creativetrax.com>:

> On 3/25/11 7:03 PM, William Stein wrote:
>>
>> Hi,
>>
>> Please find bugs in http://flask.sagenb.org.  Is it slow?  Fast?
>> Broken in *any* way at all?
>
>
> Jmol doesn't work, as far as we can tell.  We aren't sure why, though. Kudos
> to whoever can figure out why jmol isn't working!
>
> It seems that the jmol applet loads, but it can't find the file containing
> the jmol instructions, for some reason.  It may be that what we really
> should do is just port the new jmol patch up on trac to work on this new
> server.

In case it helps, I see this on console:
-%<-
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.7) (mandriva-16.b20-x86_64)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
Exception in thread "Thread-6" java.lang.NullPointerException
at sun.applet.AppletPanel.showAppletStatus(AppletPanel.java:947)
at sun.applet.AppletPanel.run(AppletPanel.java:607)
at java.lang.Thread.run(Thread.java:636)
urlImage=jar:file:/home/pcpa/.icedteaplugin/cache/http/flask.sagenb.org/java/jmol/JmolApplet0.jar!/jmol75x29x8.gif
Jmol applet jmolApplet0__7259920705109835__ initializing
AppletRegistry.checkIn(jmolApplet0__7259920705109835__)
applet context: -applet
appletDocumentBase=http://flask.sagenb.org/doc/live/tutorial/
appletCodeBase=http://flask.sagenb.org/java/jmol/
(C) 2008 Jmol Development
Jmol Version 11.6.16 2008-11-24 13:39
java.vendor:Sun Microsystems Inc.
java.version:1.6.0_20
os.name:Linux
memory:33.7/91.0
useCommandThread: false
appletId:jmolApplet0__7259920705109835__
FileManager opening http://flask.sagenb.org/java/jmol/appletweb/SageMenu.mnu
defaults = "Jmol"
backgroundColor = "black"
language=pt_BR
FileManager opening
http://flask.sagenb.org/home/_sage_/1/cells/14/sage0-size500.jmol?1301150152
script compiler ERROR: esperado um comando
----line 1 command 1 of /home/_sage_/1/cells/14/sage0-size500.jmol?1301150152:
>>>> <!DOCTYPE html> <<<<
ERRO no "script": script compiler ERROR: esperado um comando
----line 1 command 1 of /home/_sage_/1/cells/14/sage0-size500.jmol?1301150152:
>>>> <!DOCTYPE html> <<<<
eval ERROR:
----line 1 command 1:
script >> "/home/_sage_/1/cells/14/sage0-size500.jmol?1301150152" <<
-%<-

But testing on chromium-browser, firefox frequently is "more compatible".

I solved a similar issue of jmol not understanding the input in the mandriva
sagemath package, but for console use, by running "jmol -s", important
bits should be:

-%<-
--- sage-4.6.2/spkg/build/sage-4.6.2/sage/plot/plot3d/base.pyx.orig 2011-01-14
18:06:01.349974001 -0200
+++ sage-4.6.2/spkg/build/sage-4.6.2/sage/plot/plot3d/base.pyx 2011-01-14
18:07:03.463973996 -0200
@@ -817,12 +817,7 @@ end_scene""" % (render_params.antialiasi
return box_min, box_max

def _prepare_for_jmol(self, frame, axes, frame_aspect_ratio,
aspect_ratio, zoom):
- from sage.plot.plot import EMBEDDED_MODE
- if EMBEDDED_MODE:
- s = 6
- else:
- s = 3
- box_min, box_max =
self._rescale_for_frame_aspect_ratio_and_zoom(s, frame_aspect_ratio,
zoom)
+ box_min, box_max =
self._rescale_for_frame_aspect_ratio_and_zoom(6, frame_aspect_ratio,
zoom)
a_min, a_max = self._box_for_aspect_ratio(aspect_ratio,
box_min, box_max)
return self._transform_to_bounding_box(box_min, box_max,
a_min, a_max, frame=frame,
axes=axes, thickness=1,
@@ -1110,7 +1105,7 @@ end_scene""" % (render_params.antialiasi

T = self._prepare_for_jmol(frame, axes,
frame_aspect_ratio, aspect_ratio, zoom)
T.export_jmol(archive_name, force_reload=EMBEDDED_MODE,
zoom=zoom*100, **kwds)
- viewer_app = "sage-native-execute " +
os.path.join(sage.misc.misc.SAGE_LOCAL, "bin/jmol")
+ viewer_app = "jmol -s"

# We need a script to load the file
f = open(filename + '.jmol', 'w')
-%<-

While not exactly solving the issue, I hope this information may
help find the cause,
but the -s flag should only be required for newer jmol.

> And congrats to Mike, Rado, the many testers, and others who got this all
> working!  It will be *much* easier to understand and modify the notebook
> code after we migrate to this.
>
> Thanks,
>
> Jason

Paulo

Jonathan

unread,
Mar 26, 2011, 11:03:23 AM3/26/11
to sage-devel
This problem with Jmol appears to be multifaceted.
1) The path to Jmol looks strange, although the error messages do
appear to come from Jmol.
2) It looks like something is being added to the top of the script
file for Jmol and confusing it.
3) Could also related to the JavaVM you are using. Jmol is only
tested against the Sun/Oracle VM.

*We are working on patches to Jmol in the present notebook. There are
still some asychronicity issues that I think I've almost got a handle
on. Let's not try to move this stuff to the new notebook until that
is solved. I hope today :)

Jonathan

Paulo César Pereira de Andrade

unread,
Mar 26, 2011, 11:29:03 AM3/26/11
to sage-...@googlegroups.com, Jonathan
2011/3/26 Jonathan <gu...@uwosh.edu>:

> This problem with Jmol appears to be multifaceted.
> 1) The path to Jmol looks strange, although the error messages do
> appear to come from Jmol.
> 2) It looks like something is being added to the top of the script
> file for Jmol and confusing it.
> 3) Could also related to the JavaVM you are using.  Jmol is only
> tested against the Sun/Oracle VM.

I just tested with firefox also, to ensure it is not some chromium-browser
issue, but got the same results. With some extra tests I could see the
contents with this procedure:

cut&paste from jvm debug output in browser, for example in my test
http://flask.sagenb.org/home/_sage_/4/cells/14/sage0-size500.jmol?1301151907

then, look at the contents of sage0-size500.jmol and download
http://flask.sagenb.org//home/_sage_/4/cells/14/sage0-size500-525945175.jmol.zip

then, unzip sage0-size500-525945175.jmol.zip and run jmol -s SCRIPT

I think it may be an authorization issue, because if using wget to fetch
the first file, it downloads the top page with form for login and password.

> *We are working on patches to Jmol in the present notebook.  There are
> still some asychronicity issues that I think I've almost got a handle
> on.  Let's not try to move this stuff to the new notebook until that
> is solved.  I hope today :)

No problems :-) I just tested jmol because of comments, and it
usually is what people want to see first, interactive 3d graphics :-)

> Jonathan

Paulo

William Stein

unread,
Mar 26, 2011, 12:55:44 PM3/26/11
to sage-devel, sage-notebook
Hi,

With the flask.sagenb.org testing notebook, it seems like when I click
on the "Rate it" button on a published worksheet, it doesn't work,
e.g., here:

http://flask.sagenb.org/home/pub/2/

William

Jason Grout

unread,
Mar 26, 2011, 7:57:01 PM3/26/11
to sage-...@googlegroups.com

Even better: clone the flask notebook, make the changes there, and get
them merged into the new notebook. With the flask notebook out there in
testing, there's no reason that development has to stall on the flask
notebook.

Jason

Jason Grout

unread,
Mar 26, 2011, 8:08:17 PM3/26/11
to sage-...@googlegroups.com

I already applied all of your patches to my local copy of the flask
notebook, and I think everything is probably good to go except for the
problem I outline below.

Short version: when jmol requests a file, flask doesn't think the
request comes from an authenticated user, so it redirects jmol to the
notebook homepage so that jmol can log in. I think jmol should pass the
session cookie with its request to let flask know that the request is
coming from an authenticated user.

Long version:

I applied the following patch to devel/sagenb/flask_version/base.py:

diff -r 91e83c46bae5 flask_version/base.py
--- a/flask_version/base.py Wed Mar 16 03:40:25 2011 -0700
+++ b/flask_version/base.py Sat Mar 26 18:59:17 2011 -0500
@@ -23,6 +23,9 @@
self.add_static_path('/javascript', DATA)
self.add_static_path('/static', DATA)
self.add_static_path('/java', DATA)
+ import mimetypes
+ mimetypes.add_type('text/plain','.jmol')
+

#######
# Doc #
@@ -267,6 +270,8 @@
@app.before_request
def set_notebook_object():
g.notebook = notebook
+ if not request.path.endswith('alive'):
+ print "REQUEST: ", request

########################
# Register the modules #


The first hunk (from Ira Hanson) ensures that ".jmol" files are
delivered as text (otherwise, it seems that they are delivered as binary
something-or-other). The second hunk prints out every request that is
made of the server. Then I opened a new worksheet and tried to create a
jmol plot. Here is the relevant logging info:


REQUEST: <Request 'http://localhost:8000/home/admin/309/JmolApplet' [GET]>
REQUEST: <Request
'http://localhost:8000/home/admin/309/cells/1/sage0-size500.jmol?1301173518'
[GET]>
REQUEST: <Request
'http://localhost:8000/?next=http%3A%2F%2Flocalhost%3A8000%2Fhome%2Fadmin%2F309%2Fcells%2F1%2Fsage0-size500.jmol%3F1301173518'
[GET]>

Notice that jmol tries to get the .jmol file. However, it is redirected
to the root with a next query parameter. This indicates to me that
flask did not think that jmol had permissions to get the file, and
redirected jmol to the root so it could log in. So I think the key
problem here is that when jmol tries to request the .jmol file, it isn't
giving the necessary cookies or whatever to let flask know that it is
part of the current session.

So how do we solve this? How does flask know that jmol's request is
part of the current logged-in session? If jmol passed the right cookie,
I think that would do it. We could also just turn off authentication
checks for retrieving files from cells, though that sounds risky. I
think that would be what was done with the old notebook, though.
Another thing we could do is pass a secret key to jmol which would
enable it to retrieve the file, even if it didn't send the session
cookie back to flask with its request for the file.

Rado or Mike: how do you think we should get jmol requests to be
recognized as requests coming from an authenticated user?

Jonathan: do you know any other places where jmol is used behind a
login, so it has to request files and data with some sort of session
cookie or something?

Thanks,

Jason

Francois Bissey

unread,
Mar 26, 2011, 9:52:18 PM3/26/11
to sage-...@googlegroups.com

Where can we find the flask notebook code with all the dependencies needed?
And any patches needed for sage?

Would be cool to toy with this locally.

Francois

This email may be confidential and subject to legal privilege, it may
not reflect the views of the University of Canterbury, and it is not
guaranteed to be virus free. If you are not an intended recipient,
please notify the sender immediately and erase all copies of the message
and any attachments.

Please refer to http://www.canterbury.ac.nz/emaildisclaimer for more
information.

Jason Grout

unread,
Mar 26, 2011, 9:56:02 PM3/26/11
to sage-...@googlegroups.com
On 3/26/11 8:52 PM, Francois Bissey wrote:
> Where can we find the flask notebook code with all the dependencies needed?
> And any patches needed for sage?
>
> Would be cool to toy with this locally.

https://code.google.com/r/rkirov-flask/

I also applied some of the patches at #9232 and #9238 and the new jmol
spkg there too. I think that this issue of jmol having authenticated
requests is orthogonal to the upgrade at those two tickets, though.

Jason

Harald Schilly

unread,
Mar 27, 2011, 5:56:40 AM3/27/11
to sage-n...@googlegroups.com, sage-devel, bugdays, William Stein
On Saturday, March 26, 2011 3:03:27 AM UTC+1, William Stein wrote:

Broken in *any* way at all?

I found a detail that doesn't work for me (on Chrome 11):
Type in "Graph", hit Tab, scroll down the completion-list with the arrow keys. I can only reach the first two. This also happens for other completions, looks like something with the generated html layout is broken because it starts with one column and then splits into two.

10min later: ... I checked the generated html, i think the problem is that the surrounding ul tag of the first row does a linebreak (I tried adding style="white-space:nowrap" but no luck) and there is also an unnecessary <li> tag right next to the <ul class="completion_menu_one"> ...

H

Mike Hansen

unread,
Mar 27, 2011, 11:28:44 AM3/27/11
to sage-...@googlegroups.com, Jason Grout
Hello,

On Sun, Mar 27, 2011 at 1:08 AM, Jason Grout
<jason...@creativetrax.com> wrote:
> Rado or Mike: how do you think we should get jmol requests to be recognized
> as requests coming from an authenticated user?

The issue is that the secure cookie that Flask uses is sent as
httponly, which the Java applet won't send. Adding this patch to the
notebook code will fix that:


diff --git a/flask_version/base.py b/flask_version/base.py
--- a/flask_version/base.py
+++ b/flask_version/base.py
@@ -47,6 +53,28 @@
endpoint='/static'+base_url,
view_func=partial(self.static_view_func, root_path))

+ def save_session(self, session, response):
+ """
+ This method needs to stay in sync with the version in Flask.
+ The only modification made to it is the ``httponly=False``
+ passed to ``save_cookie``.
+
+ Saves the session if it needs updates. For the default
+ implementation, check :meth:`open_session`.
+
+ :param session: the session to be saved (a
+ :class:`~werkzeug.contrib.securecookie.SecureCookie`
+ object)
+ :param response: an instance of :attr:`response_class`
+ """
+ expires = domain = None
+ if session.permanent:
+ expires = datetime.utcnow() + self.permanent_session_lifetime
+ if self.config['SERVER_NAME'] is not None:
+ domain = '.' + self.config['SERVER_NAME']
+ session.save_cookie(response, self.session_cookie_name,
+ expires=expires, httponly=False, domain=domain)
+
def message(self, msg, cont='/', username=None, **kwds):
"""Returns an error message to the user."""
template_dict = {'msg': msg, 'cont': cont, 'username': username}

This still doesn't fix the issue for me, since the Jmol applet then
requests the .zip file from the worksheet directory rather than the
cell directory (and gets a 404). However, this should not be too hard
to track down.

--Mike

Jason Grout

unread,
Mar 28, 2011, 9:17:10 AM3/28/11
to sage-...@googlegroups.com
On 3/27/11 10:28 AM, Mike Hansen wrote:
> Hello,
>
> On Sun, Mar 27, 2011 at 1:08 AM, Jason Grout
> <jason...@creativetrax.com> wrote:
>> Rado or Mike: how do you think we should get jmol requests to be recognized
>> as requests coming from an authenticated user?
>
> The issue is that the secure cookie that Flask uses is sent as
> httponly, which the Java applet won't send. Adding this patch to the
> notebook code will fix that:


You're brilliant!

As I understand it, putting httponly=False opens us up to another avenue
of cross-site scripting attacks, though [1]. If there's any way to
avoid it, it seems that would be good. Here are some possible options:

1. Use javascript to request the files for the java applet, instead of
making the applet request the files

2. Making the .jmol and .jmol.zip files not require authentication to
retreive

What do you think, Mike?

Thanks,

Jason

[1] See
http://www.codinghorror.com/blog/2008/08/protecting-your-cookies-httponly.html,
thought http://www.gnucitizen.org/blog/why-httponly-wont-protect-you/
presents the case that httponly does not protect you against everything.

mhampton

unread,
Mar 28, 2011, 11:45:05 PM3/28/11
to sage-devel
Hey Harald (et al)-

I am wondering if this is a general bug in the sage notebook - I seem
to be having this problem with sage-4.7.alpha2 (not running the flask
notebook, just the usual one). Can someone else try this to confirm?

-Marshall

Jason Grout

unread,
Mar 29, 2011, 7:49:14 AM3/29/11
to sage-...@googlegroups.com
On 3/27/11 10:28 AM, Mike Hansen wrote:
> This still doesn't fix the issue for me, since the Jmol applet then
> requests the .zip file from the worksheet directory rather than the
> cell directory (and gets a 404). However, this should not be too hard
> to track down.

I've posted a fix to #11078 (though not a patch, since my copy of the
notebook also has the new updated jmol patches).

Thanks,

Jason


Jason Grout

unread,
Mar 29, 2011, 7:51:47 AM3/29/11
to sage-...@googlegroups.com
On 3/27/11 10:28 AM, Mike Hansen wrote:
> The issue is that the secure cookie that Flask uses is sent as
> httponly, which the Java applet won't send. Adding this patch to the
> notebook code will fix that:

Rado: I have applied the patch to my clone at
https://code.google.com/r/jasongrout-sagenb/. Can you pull from me? To
get JMOL fully working, a change needs to be made to the sage library as
well; see #11078.

Thanks,

Jason


Jason Grout

unread,
Mar 29, 2011, 10:11:17 AM3/29/11
to sage-...@googlegroups.com
On 3/25/11 9:03 PM, William Stein wrote:
> Hi,
>
> Please find bugs in http://flask.sagenb.org. Is it slow? Fast?
> Broken in *any* way at all?
>
> This is the result of a huge amount of awesome work of Rado Kirov and
> Mike Hansen and many, many others.
>
> There is exactly one known bug -- JMOL 3d graphics do not work at all.
>
> This is running *multithreaded* so it may actually be vastly more
> scalable than the previous notebook... some testing has suggested
> this.

I've made trac ticket 11080 [1] to keep track of progress and needed
patches for the flask notebook.

Jason

[1] http://trac.sagemath.org/sage_trac/ticket/11080

Jason Grout

unread,
Mar 29, 2011, 8:07:54 PM3/29/11
to sage-...@googlegroups.com
On 3/25/11 9:03 PM, William Stein wrote:
> Hi,
>
> Please find bugs in http://flask.sagenb.org. Is it slow? Fast?
> Broken in *any* way at all?

For some reason, I can't insert text cells. I insert a text cell and
the page refreshes. My guess is that somehow the state numbers get out
of sync and that forces a page refresh.

Jason


Benjamin Jones

unread,
Mar 29, 2011, 8:41:06 PM3/29/11
to sage-devel


On Mar 28, 10:45 pm, mhampton <hampto...@gmail.com> wrote:
> Hey Harald (et al)-
>
> I am wondering if this is a general bug in the sage notebook - I seem
> to be having this problem with sage-4.7.alpha2 (not running the flask
> notebook, just the usual one).  Can someone else try this to confirm?
>
> -Marshall
>
> On Mar 27, 4:56 am, Harald Schilly <harald.schi...@gmail.com> wrote:
>

Could it be that this is a problem with Chrome and the non-bleeding
edge jmol package as in this thread:

http://groups.google.com/group/sage-support/browse_thread/thread/47046e1c81d75d24/48e4b7d7beb19035?lnk=gst&q=jmol#48e4b7d7beb19035

??

--
Benjamin Jones

Jason Grout

unread,
Mar 29, 2011, 8:41:16 PM3/29/11
to sage-...@googlegroups.com

I've committed a fix to my clone:

https://code.google.com/r/jasongrout-sagenb/source/detail?r=7a13d03fde6b0e341da0b86238db5c3305719a63

We came, saw, and conquered this issue in January. I remember us fixing
it. Well, anyways, there's the fix. Can you look over it Rado and pull
my two changes to the official tree?

Jason

Rado

unread,
Mar 30, 2011, 12:21:22 AM3/30/11
to sage-devel
Great job Jason and Mike. Seems the Jmol problem is fixed. At least it
works here on ubuntu and firefox 3.6 and chromium 10 with sun's java.

I pulled Jason's changes into my repo, so every one who pulled from me
can do just hg pull; hg up. Finally, there needs to be one line change
done in the sage library as given by Jason in http://trac.sagemath.org/sage_trac/ticket/11078.
After sage -br you should have Jmol working.

Rado

On Mar 30, 8:41 am, Jason Grout <jason-s...@creativetrax.com> wrote:
> On 3/29/11 7:07 PM, Jason Grout wrote:
>
> > On 3/25/11 9:03 PM, William Stein wrote:
> >> Hi,
>
> >> Please find bugs inhttp://flask.sagenb.org. Is it slow? Fast?
> >> Broken in *any* way at all?
>
> > For some reason, I can't insert text cells. I insert a text cell and the
> > page refreshes. My guess is that somehow the state numbers get out of
> > sync and that forces a page refresh.
>
> I've committed a fix to my clone:
>
> https://code.google.com/r/jasongrout-sagenb/source/detail?r=7a13d03fd...

William Stein

unread,
Apr 5, 2011, 7:31:21 PM4/5/11
to sage-...@googlegroups.com, Rado
On Tue, Mar 29, 2011 at 9:21 PM, Rado <rki...@gmail.com> wrote:
> Great job Jason and Mike. Seems the Jmol problem is fixed. At least it
> works here on ubuntu and firefox 3.6 and chromium 10 with sun's java.
>
> I pulled Jason's changes into my repo, so every one who pulled from me
> can do just hg pull; hg up. Finally, there needs to be one line change
> done in the sage library as given by Jason in http://trac.sagemath.org/sage_trac/ticket/11078.
> After sage -br you should have Jmol working.

I have updated http://flask.sagenb.org and now 3d works, and I've also
not seen the tinymce problem anymore. Great work guys! Are there any
remaining known bugs?

William

>
> Rado
>
> On Mar 30, 8:41 am, Jason Grout <jason-s...@creativetrax.com> wrote:
>> On 3/29/11 7:07 PM, Jason Grout wrote:
>>
>> > On 3/25/11 9:03 PM, William Stein wrote:
>> >> Hi,
>>
>> >> Please find bugs inhttp://flask.sagenb.org. Is it slow? Fast?
>> >> Broken in *any* way at all?
>>
>> > For some reason, I can't insert text cells. I insert a text cell and the
>> > page refreshes. My guess is that somehow the state numbers get out of
>> > sync and that forces a page refresh.
>>
>> I've committed a fix to my clone:
>>
>> https://code.google.com/r/jasongrout-sagenb/source/detail?r=7a13d03fd...
>>
>> We came, saw, and conquered this issue in January.  I remember us fixing
>> it.  Well, anyways, there's the fix.  Can you look over it Rado and pull
>> my two changes to the official tree?
>>
>> Jason
>

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

Justin C. Walker

unread,
Apr 5, 2011, 7:39:16 PM4/5/11
to sage-...@googlegroups.com, Rado

On Apr 5, 2011, at 16:31 , William Stein wrote:

> On Tue, Mar 29, 2011 at 9:21 PM, Rado <rki...@gmail.com> wrote:
>> Great job Jason and Mike. Seems the Jmol problem is fixed. At least it
>> works here on ubuntu and firefox 3.6 and chromium 10 with sun's java.
>>
>> I pulled Jason's changes into my repo, so every one who pulled from me
>> can do just hg pull; hg up. Finally, there needs to be one line change
>> done in the sage library as given by Jason in http://trac.sagemath.org/sage_trac/ticket/11078.
>> After sage -br you should have Jmol working.
>
> I have updated http://flask.sagenb.org and now 3d works, and I've also
> not seen the tinymce problem anymore. Great work guys! Are there any
> remaining known bugs?

I just followed the above link to the notebook page, and was shown a page where the "password" box has "Error: Wrong password" next to it.

This may have been mentioned before (I've deleted the thread).

Justin

--
Justin C. Walker, Curmudgeon at Large
Director
Institute for the Enhancement of the Director's income
-----------
--
They said it couldn't be done, but sometimes,
it doesn't work out that way.
- Casey Stengel
--

William Stein

unread,
Apr 5, 2011, 7:40:00 PM4/5/11
to sage-...@googlegroups.com, Justin C. Walker, Rado
On Tue, Apr 5, 2011 at 4:39 PM, Justin C. Walker <jus...@mac.com> wrote:
>
> On Apr 5, 2011, at 16:31 , William Stein wrote:
>
>> On Tue, Mar 29, 2011 at 9:21 PM, Rado <rki...@gmail.com> wrote:
>>> Great job Jason and Mike. Seems the Jmol problem is fixed. At least it
>>> works here on ubuntu and firefox 3.6 and chromium 10 with sun's java.
>>>
>>> I pulled Jason's changes into my repo, so every one who pulled from me
>>> can do just hg pull; hg up. Finally, there needs to be one line change
>>> done in the sage library as given by Jason in http://trac.sagemath.org/sage_trac/ticket/11078.
>>> After sage -br you should have Jmol working.
>>
>> I have updated http://flask.sagenb.org and now 3d works, and I've also
>> not seen the tinymce problem anymore.  Great work guys!  Are there any
>> remaining known bugs?
>
> I just followed the above link to the notebook page, and was shown a page where the "password" box has "Error: Wrong password" next to it.
>
> This may have been mentioned before (I've deleted the thread).

I think this might have to do with browsers automatically trying to login...

>
> Justin
>
> --
> Justin C. Walker, Curmudgeon at Large
> Director
> Institute for the Enhancement of the Director's income
> -----------
> --
> They said it couldn't be done, but sometimes,
> it doesn't work out that way.
>  - Casey Stengel
> --
>
>
>

Justin C. Walker

unread,
Apr 5, 2011, 7:41:40 PM4/5/11
to SAGE Development, Rado Kirov

On Apr 5, 2011, at 16:40 , William Stein wrote:

> On Tue, Apr 5, 2011 at 4:39 PM, Justin C. Walker <jus...@mac.com> wrote:
>>
>> On Apr 5, 2011, at 16:31 , William Stein wrote:
>>
>>> On Tue, Mar 29, 2011 at 9:21 PM, Rado <rki...@gmail.com> wrote:
>>>> Great job Jason and Mike. Seems the Jmol problem is fixed. At least it
>>>> works here on ubuntu and firefox 3.6 and chromium 10 with sun's java.
>>>>
>>>> I pulled Jason's changes into my repo, so every one who pulled from me
>>>> can do just hg pull; hg up. Finally, there needs to be one line change
>>>> done in the sage library as given by Jason in http://trac.sagemath.org/sage_trac/ticket/11078.
>>>> After sage -br you should have Jmol working.
>>>
>>> I have updated http://flask.sagenb.org and now 3d works, and I've also
>>> not seen the tinymce problem anymore. Great work guys! Are there any
>>> remaining known bugs?
>>
>> I just followed the above link to the notebook page, and was shown a page where the "password" box has "Error: Wrong password" next to it.
>>
>> This may have been mentioned before (I've deleted the thread).
>
> I think this might have to do with browsers automatically trying to login...

I'm using Safari, and I don't have that configured. At least, it doesn't try on any other site I go to with login on its mind.

J

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income
--------
Experience is what you get
when you don't get what you want.
--------

William Stein

unread,
Apr 5, 2011, 7:57:05 PM4/5/11
to sage-...@googlegroups.com, Justin C. Walker, Rado Kirov
On Tue, Apr 5, 2011 at 4:41 PM, Justin C. Walker <jus...@mac.com> wrote:
>
> On Apr 5, 2011, at 16:40 , William Stein wrote:
>
>> On Tue, Apr 5, 2011 at 4:39 PM, Justin C. Walker <jus...@mac.com> wrote:
>>>
>>> On Apr 5, 2011, at 16:31 , William Stein wrote:
>>>
>>>> On Tue, Mar 29, 2011 at 9:21 PM, Rado <rki...@gmail.com> wrote:
>>>>> Great job Jason and Mike. Seems the Jmol problem is fixed. At least it
>>>>> works here on ubuntu and firefox 3.6 and chromium 10 with sun's java.
>>>>>
>>>>> I pulled Jason's changes into my repo, so every one who pulled from me
>>>>> can do just hg pull; hg up. Finally, there needs to be one line change
>>>>> done in the sage library as given by Jason in http://trac.sagemath.org/sage_trac/ticket/11078.
>>>>> After sage -br you should have Jmol working.
>>>>
>>>> I have updated http://flask.sagenb.org and now 3d works, and I've also
>>>> not seen the tinymce problem anymore.  Great work guys!  Are there any
>>>> remaining known bugs?
>>>
>>> I just followed the above link to the notebook page, and was shown a page where the "password" box has "Error: Wrong password" next to it.
>>>
>>> This may have been mentioned before (I've deleted the thread).
>>
>> I think this might have to do with browsers automatically trying to login...
>
> I'm using Safari, and I don't have that configured.  At least, it doesn't try on any other site I go to with login on its mind.
>
> J

OK, then I don't know, but I've reported your issue here:
http://code.google.com/p/sagenb/issues/detail?id=4

Also, I found yet another bug, which is less "serious":

http://code.google.com/p/sagenb/issues/detail?id=3

Rado, maybe you can easily fix it?

-- William

Paulo César Pereira de Andrade

unread,
Apr 5, 2011, 8:02:19 PM4/5/11
to sage-...@googlegroups.com, William Stein, Rado
2011/4/5 William Stein <wst...@gmail.com>:

> On Tue, Mar 29, 2011 at 9:21 PM, Rado <rki...@gmail.com> wrote:
>> Great job Jason and Mike. Seems the Jmol problem is fixed. At least it
>> works here on ubuntu and firefox 3.6 and chromium 10 with sun's java.
>>
>> I pulled Jason's changes into my repo, so every one who pulled from me
>> can do just hg pull; hg up. Finally, there needs to be one line change
>> done in the sage library as given by Jason in http://trac.sagemath.org/sage_trac/ticket/11078.
>> After sage -br you should have Jmol working.
>
> I have updated http://flask.sagenb.org and now 3d works, and I've also
> not seen the tinymce problem anymore.  Great work guys!  Are there any
> remaining known bugs?

It still does not work for me, console log:


-%<-
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.7) (mandriva-16.b20-x86_64)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
Exception in thread "Thread-6" java.lang.NullPointerException
at sun.applet.AppletPanel.showAppletStatus(AppletPanel.java:947)
at sun.applet.AppletPanel.run(AppletPanel.java:607)
at java.lang.Thread.run(Thread.java:636)

Jmol applet jmolApplet0__446104758884758__ initializing
AppletRegistry.checkIn(jmolApplet0__446104758884758__)
urlImage=jar:file:/home/pcpa/.icedteaplugin/cache/http/flask.sagenb.org/java/jmol/JmolApplet0.jar!/jmol75x29x8.gif


applet context: -applet
appletDocumentBase=http://flask.sagenb.org/doc/live/tutorial/
appletCodeBase=http://flask.sagenb.org/java/jmol/
(C) 2008 Jmol Development
Jmol Version 11.6.16 2008-11-24 13:39
java.vendor:Sun Microsystems Inc.
java.version:1.6.0_20
os.name:Linux

memory:78.8/124.3
useCommandThread: false
appletId:jmolApplet0__446104758884758__


FileManager opening http://flask.sagenb.org/java/jmol/appletweb/SageMenu.mnu
defaults = "Jmol"
backgroundColor = "black"
language=pt_BR
FileManager opening

http://flask.sagenb.org/home/_sage_/109/cells/14/sage0-size500.jmol?1302047733
FileManager opening
http://flask.sagenb.org/home/_sage_/109/cells/14/cells/14/sage0-size500-75953492.jmol.zip
ERRO no "script": io error reading
http://flask.sagenb.org/home/_sage_/109/cells/14/cells/14/sage0-size500-75953492.jmol.zip|SCRIPT:
java.io.FileNotFoundException:
http://flask.sagenb.org/home/_sage_/109/cells/14/cells/14/sage0-size500-75953492.jmol.zip
eval ERROR:
----line 2 command 2 of file
/home/_sage_/109/cells/14/sage0-size500.jmol?1302047733:
script >> "SCRIPT" <<
----line 1 command 1:
script >> "/home/_sage_/109/cells/14/sage0-size500.jmol?1302047733" <<
-%<-

I think this may be related to a patch I once had for sagemath,
because I preferred to patch
it to use make openjdk find files, and not java-sun... but a later
update of openjdk made them
agree again on paths. A newer openjdk was released recently, and I
should update the
mandriva openjdk package soon, and hopefully it will be corrected.

> William
>
>>
>> Rado
>>
>> On Mar 30, 8:41 am, Jason Grout <jason-s...@creativetrax.com> wrote:
>>> On 3/29/11 7:07 PM, Jason Grout wrote:
>>>
>>> > On 3/25/11 9:03 PM, William Stein wrote:
>>> >> Hi,
>>>
>>> >> Please find bugs inhttp://flask.sagenb.org. Is it slow? Fast?
>>> >> Broken in *any* way at all?
>>>
>>> > For some reason, I can't insert text cells. I insert a text cell and the
>>> > page refreshes. My guess is that somehow the state numbers get out of
>>> > sync and that forces a page refresh.
>>>
>>> I've committed a fix to my clone:
>>>
>>> https://code.google.com/r/jasongrout-sagenb/source/detail?r=7a13d03fd...
>>>
>>> We came, saw, and conquered this issue in January.  I remember us fixing
>>> it.  Well, anyways, there's the fix.  Can you look over it Rado and pull
>>> my two changes to the official tree?
>>>
>>> Jason
>>
>> --
>> To post to this group, send an email to sage-...@googlegroups.com
>> To unsubscribe from this group, send an email to sage-devel+...@googlegroups.com
>> For more options, visit this group at http://groups.google.com/group/sage-devel
>> URL: http://www.sagemath.org

Paulo

Jason Grout

unread,
Apr 5, 2011, 9:22:16 PM4/5/11
to sage-...@googlegroups.com
On 4/5/11 6:40 PM, William Stein wrote:
> On Tue, Apr 5, 2011 at 4:39 PM, Justin C. Walker<jus...@mac.com> wrote:
>>
>> On Apr 5, 2011, at 16:31 , William Stein wrote:
>>
>>> On Tue, Mar 29, 2011 at 9:21 PM, Rado<rki...@gmail.com> wrote:
>>>> Great job Jason and Mike. Seems the Jmol problem is fixed. At least it
>>>> works here on ubuntu and firefox 3.6 and chromium 10 with sun's java.
>>>>
>>>> I pulled Jason's changes into my repo, so every one who pulled from me
>>>> can do just hg pull; hg up. Finally, there needs to be one line change
>>>> done in the sage library as given by Jason in http://trac.sagemath.org/sage_trac/ticket/11078.
>>>> After sage -br you should have Jmol working.
>>>
>>> I have updated http://flask.sagenb.org and now 3d works, and I've also
>>> not seen the tinymce problem anymore. Great work guys! Are there any
>>> remaining known bugs?
>>
>> I just followed the above link to the notebook page, and was shown a page where the "password" box has "Error: Wrong password" next to it.
>>
>> This may have been mentioned before (I've deleted the thread).


I'm looking at this, and I can't reproduce it locally, though I see it
on flask.sagenb.org.

William, can you pull from my repository, specifically changeset:

https://code.google.com/r/jasongrout-sagenb/source/detail?r=958d950d80278b054d7465a0180353b4c87f58f0

It's a shot in the dark for what might be the problem.

Thanks,

Jason

Paulo César Pereira de Andrade

unread,
May 24, 2011, 10:47:31 PM5/24/11
to sage-...@googlegroups.com
Em 5 de abril de 2011 21:02, Paulo César Pereira de Andrade
<paulo.cesar.per...@gmail.com> escreveu:

I just updated Mandriva cooker to icedtea 1.10.1, icedtea-web 1.0.2,
and openjdk b22,
but still no luck with flask.sagenb.org:

-%<-
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.1) (mandriva-16.b22-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
urlImage=jar:file:/home/pcpa/.icedtea/cache/http/flask.sagenb.org/java/jmol/JmolApplet0.jar!/jmol75x29x8.gif
Jmol applet jmolApplet0__63530260508382__ initializing
AppletRegistry.checkIn(jmolApplet0__63530260508382__)


applet context: -applet
appletDocumentBase=http://flask.sagenb.org/doc/live/tutorial/
appletCodeBase=http://flask.sagenb.org/java/jmol/
(C) 2008 Jmol Development
Jmol Version 11.6.16 2008-11-24 13:39
java.vendor:Sun Microsystems Inc.

java.version:1.6.0_22
os.name:Linux
memory:15.1/61.7
useCommandThread: false
appletId:jmolApplet0__63530260508382__
FileManager opening http://flask.sagenb.org/java/jmol/appletweb/SageMenu.mnu
document not found!


defaults = "Jmol"
backgroundColor = "black"
language=pt_BR
FileManager opening

http://flask.sagenb.org/home/_sage_/242/cells/14/sage0-size500.jmol?1306291255
FileManager opening
http://flask.sagenb.org/home/_sage_/242/cells/14/cells/14/sage0-size500-897772765.jmol.zip


ERRO no "script": io error reading

http://flask.sagenb.org/home/_sage_/242/cells/14/cells/14/sage0-size500-897772765.jmol.zip|SCRIPT:
java.io.FileNotFoundException:
http://flask.sagenb.org/home/_sage_/242/cells/14/cells/14/sage0-size500-897772765.jmol.zip


eval ERROR:
----line 2 command 2 of file

/home/_sage_/242/cells/14/sage0-size500.jmol?1306291255:


script >> "SCRIPT" <<
----line 1 command 1:

script >> "/home/_sage_/242/cells/14/sage0-size500.jmol?1306291255" <<
-%<-

Thanks,
Paulo

Reply all
Reply to author
Forward
0 new messages