Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultipleIntegrationError #126

Closed
davidbrochart opened this issue Feb 20, 2023 · 3 comments · Fixed by #130
Closed

MultipleIntegrationError #126

davidbrochart opened this issue Feb 20, 2023 · 3 comments · Fixed by #130

Comments

@davidbrochart
Copy link
Collaborator

With y-py v0.6.0, the following code:

import y_py as Y

doc = Y.YDoc()
a = doc.get_array("a")
d = Y.YMap({})
with doc.begin_transaction() as t:
    a.extend(t, [d])

errors out with:

Err(PyErr { type: <class 'y_py.MultipleIntegrationError'>, value: MultipleIntegrationError('Cannot integrate a nested Ypy object because is already integrated into a YDoc: {}'), traceback: None })

See jupyter-server/jupyter_ydoc#146.

@davidbrochart
Copy link
Collaborator Author

@Waidhoferj it used to work with v0.5.5, is it a regression or is it not allowed anymore?

@davidbrochart
Copy link
Collaborator Author

It seems to be an issue with extend, because append works fine:

import y_py as Y

d = Y.YDoc()
a = d.get_array("a")
m = Y.YMap({"foo": "bar"})
d.transact(lambda t: a.append(t, m))

@Waidhoferj
Copy link
Collaborator

This appears to be a regression. If the type you are inserting is preliminary, then it should be integratabtle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants