-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
EnhancementError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasIO JSONread_json, to_json, json_normalizeread_json, to_json, json_normalizegood first issue
Description
When opening a json file that doesn't exist with read_json
, we get a ValueError
with error messages like:
>>> import pandas
>>> pandas.read_json('no_file.json')
ValueError: Unexpected character found when decoding 'null'
>>> pandas.read_json('a_dir/no_file.json')
ValueError: Expected object or value
It'd probably be better to raise an exception like:
FileNotFoundError: No such file: 'no_file.json'
janosh, s2terminal and DimIsaev
Metadata
Metadata
Labels
EnhancementError ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasIO JSONread_json, to_json, json_normalizeread_json, to_json, json_normalizegood first issue