jupyter-server / synchronizer Goto Github PK
View Code? Open in Web Editor NEWA Jupyter Server Session Manager that rehydrates and persists.
License: BSD 3-Clause "New" or "Revised" License
A Jupyter Server Session Manager that rehydrates and persists.
License: BSD 3-Clause "New" or "Revised" License
Hi, thanks for implementing this fantastic client side resilient features, this is very helpful to recovery state from a client side restart, I tried it locally with the example list on readme (1 local kernelgateway, 1 local jupyterlab client), but saw below error when trying to run a regular jupyter lab with synchronizer enabled
.venv/lib/python3.8/site-packages/jupyter_server_synchronizer/manager.py", line 234, in list_sessions
out = await super().list_sessions(self)
TypeError: list_sessions() takes 1 positional argument but 2 were given
Following the readme
$ jupyter kernelgateway \
--port 9999 \
--JupyterWebsocketPersonality.list_kernels=True
$ jupyter lab \
--gateway-url=http://127.0.0.1:9999 \
--ServerApp.session_manager_class=jupyter_server_synchronizer.SynchronizerSessionManager \
--SynchronizerSessionManager.database_filepath=jupyter-database.db \
--SynchronizerSessionManager.autosync=True \
--SynchronizerSessionManager.log_level=DEBUG
.venv/lib/python3.8/site-packages/jupyter_server_synchronizer/manager.py", line 234, in list_sessions
out = await super().list_sessions(self)
TypeError: list_sessions() takes 1 positional argument but 2 were given
The expected behavior is to see it run without exception, not sure if it's some deps incompatible issue, but according to https://github.com/jupyter-server/synchronizer/blob/main/pyproject.toml, only seen to required jupyter_server>=1.16.0
and python >=3.7
$ jupyter lab \ --gateway-url=http://127.0.0.1:9999 \ --ServerApp.session_manager_class=jupyter_server_synchronizer.SynchronizerSessionManager \ --SynchronizerSessionManager.database_filepath=jupyter-database.db \ --SynchronizerSessionManager.autosync=True \ --SynchronizerSessionManager.log_level=DEBUG \ --ip 0.0.0.0 \ port 8080 [I 2022-08-15 22:20:32.616 ServerApp] jupyter_server_synchronizer | extension was successfully linked. [I 2022-08-15 22:20:32.626 ServerApp] jupyterlab | extension was successfully linked. [I 2022-08-15 22:20:32.634 ServerApp] nbclassic | extension was successfully linked. [I 2022-08-15 22:20:32.784 ServerApp] notebook_shim | extension was successfully linked. [W 2022-08-15 22:20:32.788 ServerApp] Config option `log_level` not recognized by `SynchronizerSessionManager`. [I 2022-08-15 22:20:32.813 ServerApp] notebook_shim | extension was successfully loaded. [W 2022-08-15 22:20:32.814 ServerApp] jupyter_server_synchronizer | extension failed loading with message: 'NoneType' object is not callable [I 2022-08-15 22:20:32.815 LabApp] JupyterLab extension loaded from .venv/lib/python3.8/site-packages/jupyterlab [I 2022-08-15 22:20:32.815 LabApp] JupyterLab application directory is .venv/share/jupyter/lab [I 2022-08-15 22:20:32.818 ServerApp] jupyterlab | extension was successfully loaded. [I 2022-08-15 22:20:32.821 ServerApp] nbclassic | extension was successfully loaded. [I 2022-08-15 22:20:32.821 ServerApp] Serving notebooks from local directory: [I 2022-08-15 22:20:32.821 ServerApp] Jupyter Server 1.18.1 is running at: [I 2022-08-15 22:20:32.821 ServerApp] Kernels will be managed by the Gateway server running at: [I 2022-08-15 22:20:32.821 ServerApp] http://127.0.0.1:9999 [I 2022-08-15 22:20:32.821 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [W 2022-08-15 22:20:32.825 ServerApp] No web browser found: could not locate runnable browser. [C 2022-08-15 22:20:32.825 ServerApp][E 2022-08-15 22:20:38.509 ServerApp] Uncaught exception GET /api/sessions?1660602038126 (172.16.5.55)
HTTPServerRequest(protocol='http', host='localhost:8080', method='GET', uri='/api/sessions?1660602038126', version='HTTP/1.1', remote_ip='172.16.5.55')
Traceback (most recent call last):
File "venv/lib/python3.8/site-packages/tornado/web.py", line 1713, in _execute
result = await result
File ".venv/lib/python3.8/site-packages/jupyter_server/services/sessions/handlers.py", line 36, in get
sessions = await ensure_async(sm.list_sessions())
File ".venv/lib/python3.8/site-packages/jupyter_server/utils.py", line 182, in ensure_async
result = await obj
File ".venv/lib/python3.8/site-packages/jupyter_server_synchronizer/manager.py", line 234, in list_sessions
out = await super().list_sessions(self)
TypeError: list_sessions() takes 1 positional argument but 2 were given
This has been discussed on https://stackoverflow.com/questions/34342155/how-to-pickle-or-store-jupyter-ipython-notebook-session-for-later
https://github.com/uqfoundation/dill sounds like a thing that could also be useful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.