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

Saving image in the loop freezes #133

Open
repkovsky opened this issue Sep 24, 2023 · 2 comments
Open

Saving image in the loop freezes #133

repkovsky opened this issue Sep 24, 2023 · 2 comments

Comments

@repkovsky
Copy link

repkovsky commented Sep 24, 2023

I am capturing image from webcam using code from demo. Unfortunately after triggering capture with camera button in ImageRecorder, I see only 3 updates in the output Image and then the loop freezes.

camera = CameraStream(constraints={'facing_mode': 'user', 'audio': False, 'video': { 'width': 640, 'height': 480}})
image_recorder = ImageRecorder(stream=camera)
out = Image()
stop_process = False

def process_image(_):
    if stop_process:
        return
    out.value = image_recorder.image.value
    image_recorder.recording = True

image_recorder.image.observe(process_image, names=['value'])
image_recorder.recording = True
HBox([out, image_recorder])

I found that this can be functionally solved by setting callback to image_recorder.recording change by image_recorder.observe(process_image, names=['recording']), but this is only workaround of the bug.

@maltegrosse
Copy link

maltegrosse commented Oct 9, 2023

I am running into the same issue (using jupyterlab 3.x)

is there any configuration available where its definitly working?

P.S. Got it working on another instance... some brief overview (selection) of packages which differ and could be the reason

working not working
ipython 8.4.0 ipython 8.8.0
ipywidgets 7.7.1 ipywidgets 8.0.4
jupyter-contrib-core 0.4.0 jupyter-contrib-nbextensions 0.5.1 jupyter-nbextensions-configurator 0.5.0 missing
jupyter_client 7.3.4 jupyter_core 4.11.1 jupyter_server 1.18.1 jupyter_telemetry 0.1.0 jupyterhub 2.3.1 jupyterhub-base 2.3.1 jupyterlab 3.4.3 jupyterlab-drawio 0.9.0 jupyterlab_pygments 0.2.2 jupyterlab_server 2.15.0 jupyterlab_widgets 1.1.1 jupyter_client 7.4.9 jupyter_core 5.1.3 jupyter_events 0.6.3 jupyter_server 2.1.0 jupyter_server_terminals 0.4.4 jupyter_telemetry 0.1.0 jupyterhub 3.1.0 jupyterhub-base 3.1.0 jupyterlab 3.5.2 jupyterlab_widgets 3.0.5
websocket-client 1.3.3 websocket-client 1.4.2
websockets 11.0.3 missing

i will try now to cherry pick and upgrade/downgrade some packages and see where the root issue is....

@maltegrosse
Copy link

so I could not figure out which package exactly breaks the ipywebrtc plugin, but I could see that following containers:

  • working: jupyter/datascience-notebook:lab-3.4.3
  • not working: jupyter/datascience-notebook:lab-3.4.7

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

No branches or pull requests

2 participants