A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/29102 below:

Misleading error messages when opening inexistent json file · Issue #29102 · pandas-dev/pandas · GitHub

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'

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4