my 2 newest do the same thing rember they are still basically wild animals and when they are young other animals eat them so they are just trying to scare you off from eating them.

i got 2 green tree pythons who use to strike at me every time they saw me but both had a not so good shed so had to take them out there cages and put them into one that holds higher humidity and they never tried biting me even when they crawled off there perch onto my hand while moving them to the shedding cages. it's taken 6 months to get them to that tame though and was only touching me for maybe a minute at most