Giter Site home page Giter Site logo

synchronizer's People

Contributors

blink1073 avatar chiawchen avatar dependabot[bot] avatar github-actions[bot] avatar pre-commit-ci[bot] avatar zsailer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

synchronizer's Issues

TypeError: list_sessions() takes 1 positional argument but 2 were given

Description

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

Reproduce

Following the readme

  1. on one terminal run the kernelgateway server up
$ jupyter kernelgateway \
    --port 9999 \
    --JupyterWebsocketPersonality.list_kernels=True
  1. on another terminal run the jupyter lab up
$ 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
  1. Then observed the error msg been pop out on client side
.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

Expected behavior

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

Context

  • Operating System and version: Linux ubuntu 20.04
  • Browser and version: Chrome
  • Python: 3.8
  • Jupyter Server version: 1.18.1
  • Jupyter Lab version: 3.4.5
  • Jupyter Server Synchronizer version: 0.0.8
  • Jupyter Kernel Gateway version: 2.5.1
Command Line Output
$ 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.