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
"cb_append_data_point" leads to runtime error if no existing points are present #14
Comments
Error is thrown by underlying pyqtgraph, complaining, that there is no data to be plot I believe. Are the pglive examples running OK from your environment? I think either providing some input data causing error or posting some minimal reproducible code would help me to figure out the issue. Without it, I can't reproduce the exact issue and will be just guessing what might be wrong. Try maybe just collecting the data before are passed to callback and see if there is no None values or empty List or something like that. Pyqtgraph might ignore for example None value or empty list or string if that is found in the X or Y values. Thanks for using pglive, I hope we can solve your problem. |
Forgot to mention that I'm using PySide6. I just tried using the
Here is some example code to reproduce the errors:
|
Not sure why, but removing the pen from the |
FYI, you are correct that the original error is just a pyqtgraph issue (happens with the normal PlotWidget). I've created an issue on their github insead. The error from |
I can confirm error with cb_set_data. I found out the reason as well, but I need to do some more testing before releasing new version. |
V0.5.6 is out, fixing For
Which gave me the same error. It kind of make sense, since it's trying to plot line using only one point. You should have two :). |
FYI, the original error has been fixed on pyqtgraph's side, but not yet released (pyqtgraph/pyqtgraph#2481). Thanks for the fast response on this :) |
I initialize a LiveLinePlot, which is passed to a DataConnector for later updating. On the first iteration where I try to add a datapoint through the connecter via
cb_append_data_point
I receive the following error:I've found that checking for the presence of data in the x or y variable in the DataConnector and adding the first datapoint twice if there is none prevents the error from appearing. E.g.:
It seems like there just needs to be an additional check somewhere(?)
Using:
Python 3.10
pglive 0.5.5
The text was updated successfully, but these errors were encountered: