[Solved] AttributeError: ‘NoneType’ object has no attribute ‘current’


At the moment you call:

print self,self.parent.current

the LoginScreen is not instantiated yet, so you are calling for and object that does not exist.

The workaround is to delay the call by 1 frame, that can be done using Clock class:

 Clock.schedule_once(self._myprintfunction, 1/60)

and latter in your code but in the same class:

    def _myprintfunction(self, dt):
        print '-'*25
        print self
        print self.parent
        # print self.parent.curet <- this will throw you an error 
        print '-'*25

Hope it helps.

solved AttributeError: ‘NoneType’ object has no attribute ‘current’