Is the second start() needed?

In a tutorial I’m following they are playing a sound using the following:

def eat(self,cEntry):
self.targets.remove(cEntry.getIntoNodePath().getParent())
cEntry.getIntoNodePath().getParent().remove()
pandaEat = Parallel(SoundInterval(self.eatSound),self.panda.actorInterval(“eat”)).start()
pandaEat.start()

With that last line in there it errors saying the nonetype object doesnt have the start()

However if I take that line out it works and the sound plays as expected. Is that line needed at all?

You’re actually first creating the object, calling start(), putting the result of that function in the variable (which is None) then calling start() upon that again.
It should be one of:

def eat(self,cEntry):
  self.targets.remove(cEntry.getIntoNodePath().getParent())
  cEntry.getIntoNodePath().getParent().remove()
  pandaEat = Parallel(SoundInterval(self.eatSound),self.panda.actorInterval("eat"))
  pandaEat.start() 

Or:

def eat(self,cEntry):
  self.targets.remove(cEntry.getIntoNodePath().getParent())
  cEntry.getIntoNodePath().getParent().remove()
  Parallel(SoundInterval(self.eatSound),self.panda.actorInterval("eat")).start() 

Ok thanks just needed some reassurance. :smiley:

nomb