Fixed a bug in grid.py

This bug was causing the program to crash if the first line in the trip CSV file contains an error.