Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/q.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ def py3_encoded_csv_reader(encoding, f, dialect, is_stdin,**kwargs):
for row in csv_reader:
yield row
except ValueError as e:
if e.message is not None and e.message.startswith('could not convert string to'):
if getattr(e, "message", None) is not None and e.message.startswith('could not convert string to'):
raise CouldNotConvertStringToNumericValueException(e.message)
else:
raise CouldNotParseInputException(str(e))
Expand All @@ -887,7 +887,7 @@ def py2_encoded_csv_reader(encoding, f, dialect, is_stdin, **kwargs):
for row in csv_reader:
yield row
except ValueError as e:
if e.message is not None and e.message.startswith('could not convert string to'):
if getattr(e, "message", None) is not None and e.message.startswith('could not convert string to'):
raise CouldNotConvertStringToNumericValueException(e.message)
else:
raise CouldNotParseInputException(str(e))
Expand Down