On Mon, 31 Mar 2025 at 14:36, Dima Pasechnik <dimp...@gmail.com> wrote: > > On Mon, Mar 31, 2025 at 4:45 AM John Cremona <john.crem...@gmail.com> wrote: > > > > I still have the problem. Although what I did in my previous post "fixed" > > the issue once last week, this week I am back to not being able to use the > > notebook as it asks for a token but does not accept the token provided. > > Here is the terminal output when I tun "sage --notebook". If anyone has > > any idea what is causing this, I would be grateful. > > > > ┌────────────────────────────────────────────────────────────────────┐ > > │ SageMath version 10.6.rc0, Release Date: 2025-03-22 │ > > │ Using Python 3.12.3. Type "help()" for help. │ > > └────────────────────────────────────────────────────────────────────┘ > > ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ > > ┃ Warning: this is a prerelease version, and it may be unstable. ┃ > > ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ > > Sage doc server started running at http://127.0.0.1:36225 > > Please wait while the Sage Jupyter Notebook server starts... > > /home/john/sage/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/tornado/ioloop.py:274: > > DeprecationWarning: There is no current event loop > > loop = asyncio.get_event_loop() > > [I 2025-03-31 10:40:41.808 ServerApp] Package notebook took 0.0000s to > > import > > /home/john/sage/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/traitlets/traitlets.py:3913: > > DeprecationWarning: Keyword `trait` is deprecated in traitlets 5.0, use > > `value_trait` instead > > warn( > > /home/john/sage/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/traitlets/traitlets.py:3615: > > DeprecationWarning: Traits should be given as instances, not types (for > > example, `Int()`, not `Int`). Passing types is deprecated in traitlets 4.1. > > super().__init__(trait=trait, default_value=default_value, **kwargs) > > /home/john/sage/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/jupyter_lsp/handlers.py:6: > > DeprecationWarning: jupyter_server.base.zmqhandlers module is deprecated > > in Jupyter Server 2.0 > > from jupyter_server.base.zmqhandlers import WebSocketHandler, > > WebSocketMixin > > [I 2025-03-31 10:40:41.822 ServerApp] Package jupyter_lsp took 0.0139s to > > import > > [W 2025-03-31 10:40:41.822 ServerApp] A `_jupyter_server_extension_points` > > function was not found in jupyter_lsp. Instead, a > > `_jupyter_server_extension_paths` function was found and will be used for > > now. This function name will be deprecated in future releases of Jupyter > > Server. > > [I 2025-03-31 10:40:41.827 ServerApp] Package jupyter_server_terminals took > > 0.0048s to import > > [I 2025-03-31 10:40:41.828 ServerApp] Package jupyterlab took 0.0000s to > > import > > [I 2025-03-31 10:40:42.369 ServerApp] Package notebook_shim took 0.0000s to > > import > > [W 2025-03-31 10:40:42.369 ServerApp] A `_jupyter_server_extension_points` > > function was not found in notebook_shim. Instead, a > > `_jupyter_server_extension_paths` function was found and will be used for > > now. This function name will be deprecated in future releases of Jupyter > > Server. > > [I 2025-03-31 10:40:42.369 ServerApp] jupyter_lsp | extension was > > successfully linked. > > [I 2025-03-31 10:40:42.373 ServerApp] jupyter_server_terminals | extension > > was successfully linked. > > [I 2025-03-31 10:40:42.377 ServerApp] jupyterlab | extension was > > successfully linked. > > [I 2025-03-31 10:40:42.380 ServerApp] notebook | extension was successfully > > linked. > > /home/john/sage/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/traitlets/traitlets.py:1897: > > DeprecationWarning: ServerApp.token config is deprecated in jupyter-server > > 2.0. Use IdentityProvider.token > > return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) > > [I 2025-03-31 10:40:42.386 ServerApp] notebook_shim | extension was > > successfully linked. > > /home/john/sage/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/jupyter_server/_tz.py:33: > > DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled > > for removal in a future version. Use timezone-aware objects to represent > > datetimes in UTC: datetime.datetime.now(datetime.UTC). > > dt = unaware(*args, **kwargs) > > /home/john/sage/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/jupyter_server/_tz.py:33: > > DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled > > for removal in a future version. Use timezone-aware objects to represent > > datetimes in UTC: datetime.datetime.now(datetime.UTC). > > dt = unaware(*args, **kwargs) > > [I 2025-03-31 10:40:42.403 ServerApp] notebook_shim | extension was > > successfully loaded. > > /home/john/sage/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/jupyter_server/extension/manager.py:115: > > DeprecationWarning: A `_load_jupyter_server_extension` function was not > > found in <module 'jupyter_lsp' from > > '/home/john/sage/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/jupyter_lsp/__init__.py'>. > > Instead, a `load_jupyter_server_extension` function was found and will be > > used for now. This function name will be deprecated in future releases of > > Jupyter Server. > > loader = get_loader(loc) > > [I 2025-03-31 10:40:42.406 ServerApp] jupyter_lsp | extension was > > successfully loaded. > > [I 2025-03-31 10:40:42.406 ServerApp] jupyter_server_terminals | extension > > was successfully loaded. > > /home/john/sage/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/traitlets/traitlets.py:1897: > > DeprecationWarning: ServerApp.token config is deprecated in jupyter-server > > 2.0. Use IdentityProvider.token > > return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self)) > > [I 2025-03-31 10:40:42.408 LabApp] JupyterLab extension loaded from > > /home/john/sage/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/jupyterlab > > [I 2025-03-31 10:40:42.408 LabApp] JupyterLab application directory is > > /home/john/sage/local/var/lib/sage/venv-python3.12/share/jupyter/lab > > [I 2025-03-31 10:40:42.409 LabApp] Extension Manager is 'pypi'. > > [I 2025-03-31 10:40:42.444 ServerApp] jupyterlab | extension was > > successfully loaded. > > [I 2025-03-31 10:40:42.447 ServerApp] notebook | extension was successfully > > loaded. > > [I 2025-03-31 10:40:42.447 ServerApp] Serving notebooks from local > > directory: /home/john/ecnf-data/sage > > [I 2025-03-31 10:40:42.447 ServerApp] Jupyter Server 2.7.3 is running at: > > [I 2025-03-31 10:40:42.447 ServerApp] > > http://localhost:8888/tree?token=7b2e7729b2d8056cf022f4bc7673711c1845d759b220d1db > > [I 2025-03-31 10:40:42.447 ServerApp] > > http://127.0.0.1:8888/tree?token=7b2e7729b2d8056cf022f4bc7673711c1845d759b220d1db > > [I 2025-03-31 10:40:42.447 ServerApp] Use Control-C to stop this server and > > shut down all kernels (twice to skip confirmation). > > [C 2025-03-31 10:40:42.470 ServerApp] > > > > To access the server, open this file in a browser: > > > > file:///home/john/.local/share/jupyter/runtime/jpserver-2184805-open.html > > Or copy and paste one of these URLs: > > > > http://localhost:8888/tree?token=7b2e7729b2d8056cf022f4bc7673711c1845d759b220d1db > > > > http://127.0.0.1:8888/tree?token=7b2e7729b2d8056cf022f4bc7673711c1845d759b220d1db > > What does happen if you try to open one of these URLs directly?
Just the same -- it opens the page which asks for a token or password, but the correct token (which is in the URL anyway) is not accepted. This is only with chrome, firefox is fine. And it did work (in chrome) last Friday after I fixed the permissions of /usr/local/share, which is mysterious! John > > > > [I 2025-03-31 10:40:42.732 ServerApp] Skipped non-installed server(s): > > bash-language-server, dockerfile-language-server-nodejs, > > javascript-typescript-langserver, jedi-language-server, > > julia-language-server, pyright, python-language-server, python-lsp-server, > > r-languageserver, sql-language-server, texlab, typescript-language-server, > > unified-language-server, vscode-css-languageserver-bin, > > vscode-html-languageserver-bin, vscode-json-languageserver-bin, > > yaml-language-server > > > > On Friday, 28 March 2025 at 10:48:15 UTC John Cremona wrote: > >> > >> I fixed it: looking carefully at the output led me to look at the > >> permissions in /usr/local and I found that /usr/local/share (owbed by > >> root) was rwxrwxrw- so it was not possible for non-root to go there. I > >> changed it to rwxrwxr-x and now it works normally. > >> > >> Issue closed! > >> > >> John Cremona > >> > >> On Thursday, 27 March 2025 at 18:51:33 UTC John Cremona wrote: > >>> > >>> When I want to run a notebook I start sage with "sage --notebook" > >>> which used to open up a tab on my default browser (chrome) showing a > >>> list of files in the directory where I issued the command. But now it > >>> has started doing something different, namely showing a page which > >>> wants a token to be entered in a box. This is despite the URL having > >>> the token in it. And if I do paste in the correct token it responds > >>> with "invalid credentials". > >>> > >>> This is with ubuntu 24.04 and sage 10.6.rc0 (but 10.4 does the same). > >>> > >>> It may be that it used to work before I upgraded from ubuntu 22.04 > >>> (and rebuilt sage after). > >>> > >>> It does work OK with firefox, though that is not what sage opens by > >>> default. > >>> > >>> John > > > > -- > > You received this message because you are subscribed to the Google Groups > > "sage-support" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to sage-support+unsubscr...@googlegroups.com. > > To view this discussion visit > > https://groups.google.com/d/msgid/sage-support/980f7626-993b-4530-8b2f-4721e9439b31n%40googlegroups.com. > > -- > You received this message because you are subscribed to a topic in the Google > Groups "sage-support" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/sage-support/ec1H4p4SIGY/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > sage-support+unsubscr...@googlegroups.com. > To view this discussion visit > https://groups.google.com/d/msgid/sage-support/CAAWYfq167CiYpKgh5SUeWSo1UfRTz3ZHP3sSBzEeh%3DSDg%2B_RYA%40mail.gmail.com. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/sage-support/CAD0p0K67UcMJ7mzUndN1HPTW2eKB8BA5YV7yYwBu6ZRDM7Fkwg%40mail.gmail.com.