diff --git a/spacy/util.py b/spacy/util.py index 7c64b81a0..9216edee8 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -417,6 +417,7 @@ def read_json(location): location (Path): Path to JSON file. RETURNS (dict): Loaded JSON content. """ + location = ensure_path(location) with location.open('r', encoding='utf8') as f: return ujson.load(f)