You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm managing Automerge documents through JSPyBridge.
fromjavascriptimportrequireautomerge=require('@automerge/automerge')
doc=automerge.init() # I also give it a key, "log", holding a list, using the separate automerge.load()
Updating a document requires sending the document and a change function into the .change() call, which returns the changed document. This is my best attempt using the bridge:
which does update the new state into new_doc, but this doesn't seem to be the intended way to use this library. Additionally, I start facing lots of bridge proxy timeout errors this way:
this error throws when awaiting the valueOf() when shuffling string data into eval_js() with any reasonable frequency::
Exception in thread Thread-6 (process_queue):
Traceback (most recent call last):
File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/home/jon/projects/project/file.py", line 80, in process_queue
new_doc = eval_js(''' ^^^^^^^^^^^ File "/home/jon/.local/lib/python3.11/site-packages/javascript/__init__.py", line 53, in eval_js rv = config.global_jsi.evaluateWithContext(js, local_vars, forceRefs=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jon/.local/lib/python3.11/site-packages/javascript/proxy.py", line 213, in __call__ else self._exe.callProp( ^^^^^^^^^^^^^^^^^^^ File "/home/jon/.local/lib/python3.11/site-packages/javascript/proxy.py", line 153, in callProp resp = self.pcall(ffid, "call", method, args, timeout=timeout, forceRefs=forceRefs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jon/.local/lib/python3.11/site-packages/javascript/proxy.py", line 132, in pcall raise Exception(Exception: Call to 'evaluateWithContext' timed out. Increase the timeout by setting the `timeout` keyword argument.
The text was updated successfully, but these errors were encountered:
I'm managing Automerge documents through JSPyBridge.
Updating a document requires sending the document and a change function into the
.change()
call, which returns the changed document. This is my best attempt using the bridge:but the
new_doc
always appears identical todoc
for some reason.I tried a different approach using
eval_js()
:which does update the new state into
new_doc
, but this doesn't seem to be the intended way to use this library. Additionally, I start facing lots of bridge proxy timeout errors this way:this error throws when
await
ing thevalueOf()
when shuffling string data intoeval_js()
with any reasonable frequency::The text was updated successfully, but these errors were encountered: