Skip to content

Commit

Permalink
Merge pull request #186 from martindurant/fix_bad_conversions
Browse files Browse the repository at this point in the history
Catch more stats errors
  • Loading branch information
martindurant committed Jul 25, 2017
2 parents 8d45042 + 591221b commit 3f40950
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fastparquet/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def statistics(obj):
rv['min'] = ensure_bytes(s.min)
else:
rv['min'] = encoding.read_plain(ensure_bytes(s.min),
md.type, 1)[0]
md.type, 1)[0]
except:
rv['min'] = None
if s.null_count is not None:
Expand Down Expand Up @@ -628,8 +628,9 @@ def statistics(obj):
else list(converted_types.convert(
np.array(d[name][column]), se))
)
except KeyError:
d[name][column] = None
except (KeyError, ValueError):
# catch no stat and bad conversions
d[name][column] = [None]
return d


Expand Down

0 comments on commit 3f40950

Please sign in to comment.