File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -228,11 +228,14 @@ def dss_monitor_plot(DSS: IDSS, params):
228228 monitor = DSS .ActiveCircuit .Monitors
229229 monitor .Name = params ['ObjectName' ]
230230 data = monitor .AsMatrix ()
231+ if data is None or len (data ) == 0 :
232+ raise ValueError ("There is not data to plot in the monitor. Hint: check the solution mode, solve the circuit and retry." )
233+
231234 channels = params ['Channels' ]
232235 num_ch = monitor .NumChannels
233236 channels = [ch for ch in channels if ch >= 1 and ch <= num_ch ]
234237 if len (channels ) == 0 :
235- raise IndexError (f "No valid channel numbers were specified." )
238+ raise IndexError ("No valid channel numbers were specified." )
236239
237240 bases = params ['Bases' ]
238241 header = monitor .Header
You can’t perform that action at this time.
0 commit comments