pycrdt icon indicating copy to clipboard operation
pycrdt copied to clipboard

Getting timestamp from Python is flaky

Open fcollonval opened this issue 10 months ago • 1 comments

Description

I hit the following error with the latest version:

thread '<unnamed>' panicked at src/undo.rs:26:38:
Error getting timestamp: PyErr { type: <class 'SystemError'>, value: SystemError('<built-in function time_ns> returned a result with an exception set'), traceback: Some(<traceback object at 0x7fd05aaf0980>) }

Would it be possible to make that behavior optional (and not active by default to avoid python calling Rust calling python)?

Related to https://github.com/jupyter-server/pycrdt/pull/214

Reproduce

Seen there e.g.: https://github.com/datalayer/jupyter-nbmodel-client/actions/runs/13393090927/job/37405238714

Expected behavior

No error

Context

  • version: 0.12.8
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.

fcollonval avatar Feb 18 '25 14:02 fcollonval

Would it be possible to make that behavior optional

I'm afraid that would make pycrdt not compilable to WASM again. Could you give a minimal reproducible example?

davidbrochart avatar Feb 18 '25 15:02 davidbrochart

Closing as no feedback, feel free to reopen.

davidbrochart avatar Jun 16 '25 06:06 davidbrochart