I want to catch a GPSException thrown by the gpxpy library.
try:
gpx = gpxpy.parse(open(filepath))
except GPXException:
print "GPXException for %s." % filepath
Since I am new to Python I do not understand how one would reference the exception via namespace such as gpxpy.gpx.GPSException
or an import statement such as ..
import gpxpy
import gpxpy.gpx
import gpxpy.gpx.GPSException