cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
84 stars 26 forks source link

/usr/share/doc/sage-doc-9999/html/en/index.html not accessible from jupyter notebook #683

Closed strogdon closed 2 years ago

strogdon commented 2 years ago

To reproduce:

The result is a 404 : Not Found

The browser link that fails is

http://localhost:8888/kernelspecs/sagemath/doc/html/en/index.html?v=20220310224541

Now removing the ?v=20220310224541 works, i.e.

http://localhost:8888/kernelspecs/sagemath/doc/html/en/index.html

works.

kiwifb commented 2 years ago

Right. And where does that come from?

strogdon commented 2 years ago

Most of the menu items under Help -> ... have this ?v=xxxxx. The xxxxx changes for each new notebook.

kiwifb commented 2 years ago

I am assuming they are some kind of time stamps. But I don't know what would put them there.

strogdon commented 2 years ago

Not the only issue. The html links on sage-doc-9999/html/en/index.html are broken from the notebook. They work when loaded in a browser as /usr/share/doc/sage-doc-9999/htm/en/index.html. However if I click the "languages are available" here link then the html links work from the notebook. But this here link does not go to the correct location. It also does not work on vanilla. I need to rebuild the vanilla docs from scratch to make sure I'm correct. At a minimum there is a missing index.html file that should be under /usr/share/doc/sage-doc-9999. The here link should point to this index.html file.

kiwifb commented 2 years ago

The missing file may be my fault, but it would also need a matching change in the sagemath kernel I think.

strogdon commented 2 years ago

The here link is broken on vanilla.

kiwifb commented 2 years ago

Speaking of vanilla. Where does local/share/jupyter/kernel/sagemath/doc link to these days? I am still pointing to /usr/share/doc/sage-${PV}/html/en when I probably should switch to /usr/share/doc/sage-${PV} to use the new index.html once it is in place.

strogdon commented 2 years ago

See https://trac.sagemath.org/ticket/33490 for the here link on vanilla.

strogdon commented 2 years ago

Here local/share/jupyter/kernel/sagemath is empty

ls -al local/share/jupyter/kernels/sagemath/
total 2
drwxr-xr-x 2 steven steven 1024 Jan  8 22:41 .
drwxr-xr-x 3 steven steven 1024 Jan  8 22:41 ..
kiwifb commented 2 years ago

OK, where is the kernel installed then? ~/.local/share/jupyter/kernels?

kiwifb commented 2 years ago

OK it is now in venv/share/jupyter/kernels/sagemath. The folder you have comes from an install that wasn't cleaned properly.

kiwifb commented 2 years ago

OK just pushed the parallel fix and doc install and jupyter doc link tweaks to master.

strogdon commented 2 years ago

This now works on s-o-g. And vanilla now works. Is there something on s-o-g that could have messed up vanilla results?

kiwifb commented 2 years ago

Would have to be sure which kernel is used. It is not impossible that s-o-g kernel is used when launched from vanilla if it comes first in the paths that jupyter goes through for kernels.

strogdon commented 2 years ago

I'm going to close this. For me, things are fixed. Reopen if you think necessary.