I'm surprised at the number of beginners that don't even put a secure lid on the tanks because they think the snake can't get out. I assure you, they can. Even if the walls are taller than the snake is long. Or they also sometimes leave gaps and think the snake can't fit. They can.

If this is a wild snake, it's not surprising it won't eat. They don't eat this time of year and should be hibernating. (in reptiles, called "brumating")