AttributeError: 'NoneType' object has no attribute '_dial'

When I try running demo I get the following error

dial = self.parent()._dial
AttributeError: 'NoneType' object has no attribute '_dial'

I am running on Windows.

I had this error too, and it turned out it was because I put the paint event in the PowerBar class instead of the _Bar class.