Update shapefile.py

This is just a slight modification so that the script does not fail if a STRING is stored instead of a NUMBER. Instead of failing, this script will log an error message and replace the value by 0.0 or 0 accordingly.