Without a necropsy, it's almost impossible to say. At only 6 weeks old, it could be lots of things, but if she had been eating regularly, it's not as likely to be a birth defect or genetic. Cancer wouldn't seem to be an issue at such a young age either.

Most common cause for sudden death that I've seen has been overheating. In Florida we've been getting extremely hot lately, so you'd want to look at where the tank was, what sort of heat source were you using, etc. If the tank was where sunlight was hitting it, it could overheat very quickly. Yesterday here it was 100F, so that would have killed a baby ball if I had one without AC, for instance.

COULD it be something else? Of course. But you'd want to look at MOST LIKELY causes first. Just my opinion of course, but I don't know the particulars of your set up. What size enclosure, how often had she eaten, how were you heating it, was there AC/what was house temps, etc etc. But all of it would just be speculation, because I'm not there, didn't see the snake or set up or know what the ambiant area is like.

Sorry for your loss.