First of all, what a weight is? weight is m × g.. and when a person is in space then the force of gravity isn't acting on him or her, so yeah it will not have weight, but remember gravity is a very very low, now if a body has more mass, more gravity will act on it right? just imagine the mass of a person and that of earth.. now yes, earth will do exert a force on the astronaut but is negiligable.