Ticket #38 (closed bug: fixed)

Opened 7 years ago

Last modified 7 years ago

PyQt: problem pri primerjanju QRect z None v Py 2.5

Reported by: janez Owned by: janez
Milestone: 1.0 Component: library
Severity: major Keywords:
Cc: Blocking:
Blocked By:

Description

Ce v Mosaicu kliknes na kaksno polje, dobis

Unhandled exception of type occured at 13:15:48: Traceback:

File: OWMosaicDisplay.py in line 75 Function name: contentsMouseReleaseEvent Code: self.widget.addSelection(self.tempRect.rect())

File: OWMosaicDisplay.py in line 805 Function name: addSelection Code: self.updateGraph(drillUpdateSelection = 0)

File: OWMosaicDisplay.py in line 464 Function name: updateGraph Code: self.DrawData(attrList, (xOff, xOff+squareSize), (yOff,

yOff+squareSize), 0, "", len(attrList))

File: OWMosaicDisplay.py in line 509 Function name: DrawData Code: else: self.DrawData(attrList[1:], (x0+currPos,

x0+currPos+size), (y0, y1), side +1, condition + 4*" " + attr + ": " + htmlVal + " ", totalAttrs, lastValueForFirstAttribute + int(val == values[-1]), usedAttrs + [attr], usedVals + [val], newAttrVals)

File: OWMosaicDisplay.py in line 511 Function name: DrawData Code: if len(attrList) == 1: self.addRect(x0, x1, y0+currPos,

y0+currPos+size, condition + 4*" " + attr + ": " + htmlVal + " ", usedAttrs + [attr], usedVals + [val], newAttrVals)

File: OWMosaicDisplay.py in line 615 Function name: addRect Code: if self.selectionRectangle != None and rect in

self.canvas.collisions(self.selectionRectangle) and tuple(usedVals) not in self.selectionConditions:

Exception type: Exception value: Cannot pass None as argument 1 in this call

Problem mora biti v neki nezdruzljivosti med sipom in Pythonom 2.5.

Change History

comment:1 Changed 7 years ago by janez

  • Status changed from new to closed
  • Component set to core
  • Resolution set to fixed

Z None je potrebno primerjati takole:

if self.selectionRectangle is not None:

Operator != to preverja "ekvivalentnost" (na podoben nacin, kot je 1.0 ekvivalentno 1), pri cemer pa zal crkne. ;)

Note: See TracTickets for help on using tickets.