Invalid error message in PlotCurveItem

Bug #1192800 reported by Antony Lee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyqtgraph
Fix Committed
Undecided
Unassigned

Bug Description

Lines 314-318 of PlotCurveItem.py (inp branch, commit 312) are currently

            if len(self.xData) != len(self.yData)+1: ## allow difference of 1 for step mode plots
                raise Exception("len(X) must be len(Y)+1 since stepMode=True (got %s and %s)" % (str(x.shape), str(y.shape)))
        else:
            if self.xData.shape != self.yData.shape: ## allow difference of 1 for step mode plots
                raise Exception("X and Y arrays must be the same shape--got %s and %s." % (str(x.shape), str(y.shape)))

but x and y are not defined, thus raising another error. I assume it should read self.xData.shape and self.yData.shape (and the calls to str aren't needed either).

Revision history for this message
lcampagn (luke-campagnola) wrote :

Thanks Antony!

Changed in pyqtgraph:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.