diff --git a/voluptuous/humanize.py b/voluptuous/humanize.py index ba35023..91ab201 100644 --- a/voluptuous/humanize.py +++ b/voluptuous/humanize.py @@ -9,8 +9,9 @@ def _nested_getitem(data, path): for item_index in path: try: data = data[item_index] - except (KeyError, IndexError): - # The index is not present in the dictionary, list or other indexable + except (KeyError, IndexError, TypeError): + # The index is not present in the dictionary, list or other + # indexable or data is not subscriptable return None return data