Good to hear that your snake is eating reliably, now. They can be very picky eaters, and they are notably skittish, and it is fairly normal for them to fast for months at a time. However, when a snake strikes at food in a predatory fashion (as opposed to a defensive fashion), but then will not eat the food item, it most likely is due to being too cold.
Ball Pythons (Python regius) are hot temperature snakes. They thrive at temperatures above 90°F (32°C). When I used to rehab them for a rescue program, it was almost always because their owners had given up on them due to not eating. Sometimes they would have other problems, such as respiratory infections but, luckily, both problems are solved the same way... crank the heat!
Severe infections may require medication, but mild ones are easily cured by keeping the snake at around 95°F (35°C) and giving it bowl of water large enough to soak in (dry air makes them susceptible to infections). I never had a python refuse food once it had been kept at 95°F (35°C) for a week. NOTE: this applies to pythons, ONLY! Corn snakes, king snakes, etc. should not be kept at this temperature except under orders from a veterinarian.