Ticket #236 (closed defect: wontfix)

Opened 5 years ago

Last modified 4 years ago

intermittent Error in OWD's Resources Pane

Reported by: mcarrick Owned by: cdietric
Priority: minor Milestone: Release 0.8.0
Component: OWD Version: trunk
Keywords: OWD, resources pane, component description Cc:

Description

I've just started getting this error when moving around the resource lists in the available resources plan in OWD:

Traceback (most recent call last):

File "/usr/lib/python2.5/site-packages/WaveDev/wavedev/MainFrame.py", line 1627, in OnResourceBoxLeftUp?

self.OnResourceBoxPopupGetDescr?(event)

File "/usr/lib/python2.5/site-packages/WaveDev/wavedev/MainFrame.py", line 1718, in OnResourceBoxPopupGetDescr?

+ tmpRes.description)

AttributeError?: 'NoneType?' object has no attribute 'name'

I have not figured out how to recreate the error as I seemingly get it randomly when the lists are opened and closed, and resources clicked on. Additionally, OWD seems to continue to work correctly after this error.

Change History

Changed 5 years ago by mcarrick

  • priority changed from major to minor

Changed 5 years ago by mcarrick

  • keywords pane, component description added; pane removed
  • version set to trunk
  • milestone changed from 0.7.0 to Release 0.8.0

I haven't been able to determine if this is an issue with OWD or the components themselves; it's not clear why the components name wouldn't be able to be displayed in the description pane. The error is printed so infrequently that I cannot replicate at will.

Changed 5 years ago by DrewCormier

In MainFrame?.py I'm looking at:

def OnResourceBoxPopupGetDescr?(self, event):

sn = self.resourceBox.GetSelection?() tmpRes = None if (sn != self.resourceBox.GetRootItem?() and self.resourceBox.GetItemParent?(sn) != self.resourceBox.GetRootItem?()):

# a child component (Component or Device) tmpRes = self.resourceBox.GetPyData?(sn) self.resDescrBox.Clear() self.resDescrBox.WriteText?(tmpRes.name + " (" + tmpRes.type + "): " \

+ tmpRes.description)

event.Skip()

I think it's throwing the error on tmpRes.name, which means that self.resourceBox.GetPyData?(sn) is returning None instead of a reference to a resource. I would make sure that self.resourceBox.GetSelection?()is returning something valid.

GetPyData? is a GUI method that should give you a reference to a resource that you put in there earlier (where Resource is probably an instance of ComponentClass?). If self.resourceBox.GetSelection?() did return something valid, and you are still getting an error, this probably means that you stuck a None into that there resDescrBox when you should have put a resource. This would have happened somewhere else in the code.

I hope this is helpful. Shoot me an email if you have questions: I don't check the tickets all that often.

Changed 4 years ago by cdietric

  • status changed from new to closed
  • resolution set to wontfix

OWD will be phased out in late 2009/early 2010.

Note: See TracTickets for help on using tickets.