Skip to content

Unify error messages when opening inexistent excel/csv file #29125

Open
@nottatdat

Description

@nottatdat

Similar to #29102, excel and csv file extensions now have inconsistent errors for nonexistent files.

import pandas as pd
pd.read_csv('file_1.csv')
IOError: [Errno 2] File file_1.csv does not exist: 'file_1.csv'

pd.read_excel('file_2.xlsx')
IOError: [Errno 2] No such file or directory: 'file_2.xlsx'

Would be better to have a uniform error message across multiple file extensions, like the one with json in #29104:

FileNotFoundError: File 'no_file.json' does not exist

Metadata

Metadata

Assignees

No one assigned

    Labels

    API - ConsistencyInternal Consistency of API/BehaviorEnhancementError ReportingIncorrect or improved errors from pandasIO DataIO issues that don't fit into a more specific label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions