Skip to content

Unclear error when loading unsupported HDF5 file #9539

Closed
@mangecoeur

Description

@mangecoeur

Backstory - I created some H5 files with h5py containing large 3D arrays (not python dataframes). Then I forgot this and tried to load with Pandas. Since they didn't contain real dataframes the load understandably failed. However the error thrown was:

TypeError: cannot create a storer if the object is not existing nor a value are passed

(line 1148 in pandas.io.pytables) which apart from being awkward grammar (rather cannot create a storer if the object does not exist nor a value given) doesn't suggest anything about the h5 file not being supported.

Since passing around h5 files is fairly common and sometimes they contain tables and sometimes not, it would be nice if Pandas warned you clearly that the object you are trying to load isn't a pandas-compatible table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Error ReportingIncorrect or improved errors from pandasIO HDF5read_hdf, HDFStore

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions