Nitrite <0.02
Nitrate 0.34
Hardness 19 grains /gallon
pH between 6.5 and 8.5
GH at 19 GPH equates to 324 ppm or 18 dGH. This is hard water (OK for guppies). The pH range is OK, though the 6.5 puzzles me, but neither would seem to be the issue.
Nitrate...do you really mean 0.34 or 34 without the 0 and decimal? If the former, and assuming this is in ppm, no problems here. So the 40 ppm nitrate is occurring within the aquarium. That needs to be addressed. Water changes once a week of 60-70% of the tank volume, cleaning into the substrate in open areas, and keeping the filter cleaned all help. Not overfeeding is important, and not overstocking. These can all increase nitrate, and it should never be above 20 ppm and preferably much lower.