-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When importing a file that contains a formula curve, an error is spit out on the console and the formula curve(s) do not get added to the ControlPanel properly. Other curves seem to be added properly though.
Expected behavior
All curves should be added to the ControlPanel regardless of type.
Steps to Reproduce
Attempt to import a file containing a formula:
pydm main.py -i examples/FormulaExample.trc
Possible solution (optional)
The problem seems to originate in TraceFileHandler.open_file() when emitting the curves & formulas from the curves_signal signal.
The real cause of the problem however is in ControlPanel.set_curves() as this method is only setup to handle curves, not formula curves.
There are 2 approaches to handling this issue:
- Alter
ControlPanel.set_curves()to handle both curves and formulas - Add another method to
ControlPanelfor adding formulas to the plot
a. This also requires adding another signal toTraceFileHandlerfor handling formulas since they couldn't be lumped together with this approach
My platform
No response
Additional context
The console spits out the error below:
Traceback (most recent call last):
File "<....>/trace/widgets/control_panel.py", line 369, in set_curves
del curve_dict["channel"] # Remove channel key to avoid conflicts with y_channel
~~~~~~~~~~^^^^^^^^^^^
KeyError: 'channel'
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working