diff --git a/query_runner/google_analytics.py b/query_runner/google_analytics.py index 9de66082fc..26ecc86119 100644 --- a/query_runner/google_analytics.py +++ b/query_runner/google_analytics.py @@ -10,7 +10,6 @@ logger = logging.getLogger(__name__) try: - import gspread from oauth2client.client import SignedJwtAssertionCredentials from apiclient.discovery import build import httplib2 @@ -122,7 +121,7 @@ def run_query(self, query, user): elif len(value) == 12: value = datetime.strptime(value, '%Y%m%d%H%M') else: - raise Exception('Wrong datetime format') + raise Exception("Unknown date/time format in results: '{}'".format(value)) d[column_name] = value rows.append(d) data = {'columns': columns, 'rows': rows}