Reading file and trying to hash lines

ValueError: Mixing iteration and read methods would lose data on
F.read()