Comments (5)
I tried adding a try except. But the I started seeing other mysterious exception.
I removed the try except again.
from panel.
When having multiple windows open and reloading one of them I also see
2024-04-21 07:27:21,401 Error running application handler <panel.io.handlers.ScriptHandler object at 0x0000019460880150>: Script at 'C:\repos\private\panel\script.py' replaced the output document
File 'handlers.py', line 258, in post_check:
raise RuntimeError("%s at '%s' replaced the output document" % (handler._origin, handler._runner.path)) Traceback (most recent call last):
File "c:\repos\private\panel\panel\io\handlers.py", line 389, in run
post_check()
File "c:\repos\private\panel\panel\io\handlers.py", line 258, in post_check
raise RuntimeError("%s at '%s' replaced the output document" % (handler._origin, handler._runner.path))
RuntimeError: Script at 'C:\repos\private\panel\script.py' replaced the output document
2024-04-21 07:27:21,494 WebSocket connection closed: code=1001, reason=None
2024-04-21 07:27:21,528 Failed sending message as connection was closed
2024-04-21 07:27:21,530 WebSocket connection opened
2024-04-21 07:27:21,568 ServerConnection created
2024-04-21 07:27:51,074 Error running application handler <panel.io.handlers.ScriptHandler object at 0x0000019460880150>: _pending_writes should be non-None when we have a document lock, and we should have the lock when the document changes
File 'session.py', line 244, in _document_patched:
raise RuntimeError("_pending_writes should be non-None when we have a document lock, and we should have the lock when the document changes") Traceback (most recent call last):
File "c:\repos\private\panel\panel\io\handlers.py", line 386, in run
exec(self._code, module.__dict__)
File "C:\repos\private\panel\script.py", line 186, in <module>
stream.servable()
File "c:\repos\private\panel\panel\viewable.py", line 1054, in servable
return self._create_view().servable(title, location, area, target)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\repos\private\panel\panel\viewable.py", line 395, in servable
self.server_doc(title=title, location=location) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\repos\private\panel\panel\viewable.py", line 1011, in server_doc
add_to_doc(model, doc)
File "c:\repos\private\panel\panel\io\model.py", line 118, in add_to_doc
doc.add_root(obj)
File "C:\repos\private\panel\.venv\Lib\site-packages\bokeh\document\document.py", line 324, in add_root
self.callbacks.trigger_on_change(RootAddedEvent(self, model, setter))
File "C:\repos\private\panel\.venv\Lib\site-packages\bokeh\document\callbacks.py", line 413, in trigger_on_change
invoke_with_curdoc(doc, invoke_callbacks)
File "C:\repos\private\panel\.venv\Lib\site-packages\bokeh\document\callbacks.py", line 443, in invoke_with_curdoc
return f()
^^^
File "C:\repos\private\panel\.venv\Lib\site-packages\bokeh\document\callbacks.py", line 412, in invoke_callbacks
cb(event)
File "C:\repos\private\panel\.venv\Lib\site-packages\bokeh\document\callbacks.py", line 276, in <lambda>
self._change_callbacks[receiver] = lambda event: event.dispatch(receiver)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\repos\private\panel\.venv\Lib\site-packages\bokeh\document\events.py", line 219, in dispatch
cast(DocumentPatchedMixin, receiver)._document_patched(self)
File "C:\repos\private\panel\.venv\Lib\site-packages\bokeh\server\session.py", line 244, in _document_patched
raise RuntimeError("_pending_writes should be non-None when we have a document lock, and we should have the lock when the document changes")
RuntimeError: _pending_writes should be non-None when we have a document lock, and we should have the lock when the document changes
from panel.
Also if I have a large number of windows open (4), set the fps high (60) and the min_sleep low (0.1). I can also be hard to pause the camera via the checkbox. The camera loop just keeps running for a long time sending the frames to the frontend
Later it sends the paused checkbox to all the open windows and pauses the video.
stream=ServerVideoStream(fps=60, camera_index=1, min_sleep=0.1, paused=False, log_level=logging.WARNING)
Its like the separate thread loop is preferred over the main thread.
from panel.
When having multiple windows open and reloading one of them I also see
That's a little scary and needs a new issue. It's likely something to do with the threads.
from panel.
Also if I have a large number of windows open (4), set the fps high (60) and the min_sleep low (0.1). I can also be hard to pause the camera via the checkbox.
We can consider somehow throttling events, the problem here is that you're effectively queuing up a bunch of events that have to be sent across the websocket and they all pile up. So even when you turn off the spigot the backlog still needs to be processed.
from panel.
Related Issues (20)
- `pn.widgets.Select`: `disabled_options` not working with `groups`
- Accordion vertical text after toggling on/off HOT 3
- New widget combining Multichoice and AutocompleteInput HOT 2
- panel 1.4.3 regression: `KeyError: 'content'` in jupyterlab HOT 3
- holoviews Selection1D Tap: regression on panel 1.4 HOT 2
- OAuth provider documentation incorrectly references 'code' instead of 'auth_code' HOT 1
- Using Rasterize in a hvPlot figure shows an error with Panel 1.4.3 HOT 1
- Running examples in cells on documentation website fails (seems there are some 404s) HOT 1
- `pn.widgets.Tabulator`: Hover effect not disabled with `selectable=False`
- VS Code + notebook setup, Panel + Param, no reactivity when using `pn.template`
- OSError when serving simple panel app with --num-procs and --setup HOT 5
- FileInput.value is not overwritten on Google Cloud Vertex AI Workbench (Jupyter lab) HOT 1
- Front page app invisible text in dark mode HOT 1
- expiry is not cast to int when read from oauth cookie
- ReactiveHTML components cannot have a String param initialized on creation HOT 2
- Basic auth seems to be broken starting with panel 1.4.3
- No Event Triggered with Cascading Dependencies HOT 1
- Retrieving information about client screen dimensions HOT 1
- test_multi_select_double_click error HOT 1
- Layout of app titles on homepage
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from panel.