Comments (3)
Hummm, yes, I do see this error message.
The surprising thing is that I recall trying opening multiple windows before (same version) without this issue.
This will need to be investigated.
from gr-bokehgui.
It would seem that only the waterfall sink (complex and float), and label blocks cause this error.
Unfortunately, I won't be able to look into it more in the next week or so.
from gr-bokehgui.
Skip to the end for the workaround
It may not seem like it, but I did not completely forget about the issue, and I believe I found where the problem is.
I'll try do describe it here for future reference:
Currently, the bokehgui code for one plot is separated in 2 (one could even say 3) components:
- A c++ block that interfaces with gnuradio, receives new samples to display, if necessary does some processing (like FFT), and store data points in a buffer.
- A python object that does the link between the c++ block, and the bokeh api. Creates bokeh plot objects, updates its parameters when required, and defines how to update the data points.
- The actual bokeh objects.
When a user connects, the bokeh server create a brand new session for that user, and asks the bokehgui python code to populate a blank document with plots and widgets to display on the user's browser.
At that time, the python code creates a new instance of the bokeh plot object (plus, if applicable, an object to stream it data), stores the plot object into its plot
attribute, and register a callback to be called at regular intervals (the update period).
Most plots have it so the callback function contains explicit reference to the plot object (and its data stream), so it does not need to refer to the self.plot
attribute.
But the waterfall does not. It thus tries to feed new data to whatever object is currently stored. And, when a second session is created (by reloading the page, or opening a new one), the python code only stores the most recent one, but the callback of the older one keeps being called (at least for a while), so it tries to feed data to the wrong object, without having acquired the lock for it, hence the error.
The most basic fix should be to have the callback for the waterfall take the correct plot object as argument, like the other plots do.
But that would not solve the following underlying problem:
When a display parameter needs to be changed from the gnuradio side, like for instance the x axis of a frequency plot when center frequency is changed, the python code can only operate on the plot object it has stored, so only the latest opened tab would see it.
For that, the python code would need to store all the created bokeh plot objects, and a way to remove them from storage when the related session gets destroyed so we don't keep on piling up objects.
I believe I know how to do that, and it should not take too long.
But in the mean time, there actually is a workaround: Since the error is created when multiple sessions exists, one just need to make sure only one session is ever created.
For that, you need to supply a session id in the url you connect to for all browser windows, such as: http://localhost:5006/?bokeh-session-id=test_bokehgui
Here, you can put whatever string in place of test_bokehgui
.
from gr-bokehgui.
Related Issues (20)
- Providing a default layout for the plot arrangements
- Add a BER sink
- Add a Histogram sink HOT 1
- Operation relies on deprecated event loop HOT 9
- Unable to serve bokeh document HOT 4
- tutorial.grc displayed unsuccessfully on the web page ("SyntaxError: Unexpected identifier") HOT 2
- gnuradio 3.9 requirements should be mentioned in the readme file HOT 10
- GrSwig missing in during cmake HOT 23
- Assertion len placement failed HOT 6
- Frequency sink plot can't show in mobile web client HOT 5
- possible dependency issues between bokeh 1.4->nodejs->python3? HOT 5
- AttributeError: module 'bokehgui' has no attribute 'BokehLayout' HOT 3
- Attribute Error HOT 6
- ss is replacing netstat HOT 2
- AttributeError: 'gnuradio.gr.gr_python.top_block_pb' object has no attribute 'doc' HOT 4
- Choppy waterfall display HOT 1
- AttributeError: 'gnuradio.gr.gr_python.top_block_pb' object has no attribute 'plot_lst' HOT 2
- Gui config HOT 11
- Does not support Bokeh 3 HOT 1
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 gr-bokehgui.