jupyter-server / jupyter_ydoc

Jupyter document structures for collaborative editing using Yjs/pycrdt
https://jupyter-ydoc.readthedocs.io
BSD 3-Clause "New" or "Revised" License
28 stars 17 forks source link

YNotebook error with y-py v0.6.0 #146

Closed davidbrochart closed 1 year ago

davidbrochart commented 1 year ago

Description

Trying to instantiate and set a YNotebook fails with jupyter_ydoc v0.3.2. Downgrading y-py from v0.6.0 to v0.5.5 fixes the issue.

Reproduce

  1. pip install jupyter_ydoc==0.3.2
  2. Execute the following Python code:
    
    from jupyter_ydoc import YNotebook

nb = {"cells": []}

ynb = YNotebook() ynb.set(nb)

4. See error:

Err(PyErr { type: <class 'y_py.MultipleIntegrationError'>, value: MultipleIntegrationError("Cannot integrate a nested Ypy object because is already integrated into a YDoc: {'id': '1d9dbf0a-34ac-46a4-bef9-101fb83d4cea', 'cell_type': 'code', 'execution_count': 1, 'metadata': YMap({}), 'outputs': YArray([]), 'source': YText(1 + 1)}"), traceback: None })



## Expected behavior

No error.
davidbrochart commented 1 year ago

I created a minimal reproducible example in https://github.com/y-crdt/ypy/issues/126.

fcollonval commented 1 year ago

@davidbrochart should we close this following https://github.com/jupyter-server/jupyter_ydoc/pull/147? or keep it open to carry actions when it is fixed upstream?

davidbrochart commented 1 year ago

Let's close it for now.