Jupyter notebook broken in 9.2.beta4

116 views
Skip to first unread message

Paul Masson

unread,
Jul 11, 2020, 7:09:56 PM7/11/20
to sage-devel
After a successful incremental build from 9.2.beta2, trying to start a new notebook results in the browser console error "Failed to load resource: the server responded with a status of 404 (Not Found)" when trying to fetch Mathjax from http://localhost:8888/nbextensions/mathjax/MathJax.js. Has anyone other than Dima seen this also?

This appears to be a serious server configuration error. I don't see any ticket in either this beta or the previous one that would cause this. Am I missing some new configuration step? Sage built and runs just fine.
Message has been deleted

Paul Masson

unread,
Jul 11, 2020, 8:26:02 PM7/11/20
to sage-devel
Just built a ticket based on 9.2.beta3 and the same problem occurs.

Jonathan Kliem

unread,
Jul 12, 2020, 1:58:32 AM7/12/20
to sage-devel
I posted this on sage-release, because I figured, it's due to a recent ticket. But I was mistaken because of the following:

What worked for me is running

sage -b

But running

make build

breaks it again. I hope that works for you for now. But it is of course not acceptable.

Dima Pasechnik

unread,
Jul 12, 2020, 4:23:25 AM7/12/20
to sage-devel
Among other things, this shows a need for unattended testing of Jupyter interface.

Any idea how it can be done?


--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/81c0c5fa-fce3-427b-b17f-2f6dab777b0fo%40googlegroups.com.

Joshua Campbell

unread,
Jul 12, 2020, 4:43:03 AM7/12/20
to sage-devel
I have run across this error as well. I think I was able to trace it back to https://trac.sagemath.org/ticket/29411.

Running 'make build' on that ticket's commit in the develop branch (0bcd001f760ff724832c32b4f65fa575fd82e000 make sagelib a script package) produces the error for me whereas doing so on the immediately previous commit (10fb62408a9761bf91a95d9eb7d7f16a104924c7 Trac #29289: Remove support for installing old-style SPKGs, deprecated in Sage 6.9) does not. Interestingly, it's been sort of hit-and-miss on whether the error shows up when doing just a './sage -b'.

I'm not familiar enough with Sage's configuration or packaging to run it down any further, but hopefully this info can help.

Dima Pasechnik

unread,
Jul 12, 2020, 5:34:55 AM7/12/20
to sage-devel
On Sun, Jul 12, 2020 at 9:43 AM Joshua Campbell <jcam...@gmail.com> wrote:
>
> I have run across this error as well. I think I was able to trace it back to https://trac.sagemath.org/ticket/29411.
>
> Running 'make build' on that ticket's commit in the develop branch (0bcd001f760ff724832c32b4f65fa575fd82e000 make sagelib a script package) produces the error for me whereas doing so on the immediately previous commit (10fb62408a9761bf91a95d9eb7d7f16a104924c7 Trac #29289: Remove support for installing old-style SPKGs, deprecated in Sage 6.9) does not. Interestingly, it's been sort of hit-and-miss on whether the error shows up when doing just a './sage -b'.

thanks for finding this. Apparently some dependencies no longer get
updated by "make build" after #29411.

can we please switch to external jupyter - there is no reason for
Sage to supply anything but the jupyter kernel...

>
> I'm not familiar enough with Sage's configuration or packaging to run it down any further, but hopefully this info can help.
>
> On Saturday, July 11, 2020 at 5:26:02 PM UTC-7, Paul Masson wrote:
>>
>> Just built a ticket based on 9.2.beta3 and the same problem occurs.
>>
>> On Saturday, July 11, 2020 at 4:09:56 PM UTC-7, Paul Masson wrote:
>>>
>>> After a successful incremental build from 9.2.beta2, trying to start a new notebook results in the browser console error "Failed to load resource: the server responded with a status of 404 (Not Found)" when trying to fetch Mathjax from http://localhost:8888/nbextensions/mathjax/MathJax.js. Has anyone other than Dima seen this also?
>>>
>>> This appears to be a serious server configuration error. I don't see any ticket in either this beta or the previous one that would cause this. Am I missing some new configuration step? Sage built and runs just fine.
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/9049ca5c-e4ba-40a5-906e-d0b8d2adc691o%40googlegroups.com.

Nils Bruin

unread,
Jul 12, 2020, 1:57:47 PM7/12/20
to sage-devel


On Sunday, July 12, 2020 at 2:34:55 AM UTC-7, Dima Pasechnik wrote:

can we please switch to external jupyter - there is  no reason for
Sage to supply anything but the jupyter kernel...

++ However, some care needs to be taken in how to install resources. Currently a bunch of extensions (and the entire doc if I'm not mistaken!) gets symlinked. That's great in most cases, and if you symlink carefully enough, those resources will update for the jupyter kernel install automatically thanks to the symlinks. That's very convenient -- the name of the kernel doesn't get updated though. I imagine that there are configurations of external jupyter servers for which this symlinking strategy needs adjusting. If we officially support "jupyter kernel installation" (which I hope we do at some point!) we probably need to pay attention to that.

Matthias Koeppe

unread,
Jul 12, 2020, 2:57:16 PM7/12/20
to sage-devel
I have created the following tickets for the issues raised in this thread:

#30123 (Jupyter notebook broken in 9.2.beta4)

#30124 (spkg-configure for "jupyter")

#30125 (Add testing of the Jupyter interface)

Samuel Lelievre

unread,
Jul 12, 2020, 3:11:59 PM7/12/20
to sage-devel
On 2020-07-12 09:34:55 UTC, Dima Pasechnik:
>
> Can we please switch to external jupyter - there is no reason
> for Sage to supply anything but the jupyter kernel...

This could mean one of the following:

When building:

[a] Make external Jupyter a prerequisite.

[b] If external Jupyter found, install Sage kernel for it,
    otherwise print information about how to install Jupyter
    and how to install Sage kernel for it later.

[c] If external Jupyter found, install Sage kernel for it,
    otherwise build it.

For binaries:

[z] Make external Jupyter a prerequisite for running Sage;
    at first start, install Sage kernel to external Jupyter.

[y] If external Jupyter found at first start, install Sage kernel for it,
    otherwise print information about how to install Jupyter
    and how to install Sage kernel for it later.

[x] Keep shipping Jupyter in binaries.

I don't think we want [a] or [z].
When building I could see [b] or [c].
For binaries I could see [y] or [x].

Some distributions make the Sage kernel an optional install
by providing several packages, like sagemath, sagemath-jupyter,
sagemath-documentation.

Nils has a good point: we need to think about what to do
if a user updates Sage or builds several copies of Sage.

Related:

- How to install sagemath kernel in Jupyter

- sage-devel: Installing sage as a kernel in the system-wide jupyter

- Sage Windows: Include a Sage kernelspec that is
  compatible with Windows native Jupyter

- How to install SageMath kernel in Anaconda?

Paul Masson

unread,
Jul 12, 2020, 6:06:11 PM7/12/20
to sage-devel
Confirmed that `sage -b` allows notebooks to run. There are still some console error messages about not finding `preact-compat` and `preact`. Those were both removed from the notebook last summer, so probably time to upgrade the notebook...

Dima Pasechnik

unread,
Jul 13, 2020, 5:17:06 AM7/13/20
to sage-devel
On Sun, Jul 12, 2020 at 11:06 PM Paul Masson <paulm...@comcast.net> wrote:
>
> Confirmed that `sage -b` allows notebooks to run. There are still some console error messages about not finding `preact-compat` and `preact`. Those were both removed from the notebook last summer, so probably time to upgrade the notebook...

the problem is tracked on https://trac.sagemath.org/ticket/30123

>
> On Saturday, July 11, 2020 at 10:58:32 PM UTC-7, Jonathan Kliem wrote:
>>
>> I posted this on sage-release, because I figured, it's due to a recent ticket. But I was mistaken because of the following:
>>
>> What worked for me is running
>>
>> sage -b
>>
>> But running
>>
>> make build
>>
>> breaks it again. I hope that works for you for now. But it is of course not acceptable.
>>
>> Am Sonntag, 12. Juli 2020 02:26:02 UTC+2 schrieb Paul Masson:
>>>
>>> Just built a ticket based on 9.2.beta3 and the same problem occurs.
>>>
>>> On Saturday, July 11, 2020 at 4:09:56 PM UTC-7, Paul Masson wrote:
>>>>
>>>> After a successful incremental build from 9.2.beta2, trying to start a new notebook results in the browser console error "Failed to load resource: the server responded with a status of 404 (Not Found)" when trying to fetch Mathjax from http://localhost:8888/nbextensions/mathjax/MathJax.js. Has anyone other than Dima seen this also?
>>>>
>>>> This appears to be a serious server configuration error. I don't see any ticket in either this beta or the previous one that would cause this. Am I missing some new configuration step? Sage built and runs just fine.
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/a6abf299-f768-462d-ada9-faaf9c668ebfo%40googlegroups.com.

Matthias Koeppe

unread,
Jul 18, 2020, 1:35:45 PM7/18/20
to sage-devel
Developers interested in the Jupyter notebook may also want to look into working on the overdue upgrade of relevant packages -- see https://trac.sagemath.org/ticket/26919




Reply all
Reply to author
Forward
0 new messages