Try replacing the battery. It may have failed causing your macbook to not recognize the battery.
open