Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dicttoh5] better error message for non-serializable data #3937

Merged
merged 5 commits into from
Sep 18, 2023

Conversation

woutdenolf
Copy link
Contributor

Changelog: better error message for dicttoh5 with non-serializable data

@woutdenolf woutdenolf requested a review from t20100 September 14, 2023 13:07
@sdebionne
Copy link

This will pretty be useful, thanks!

Copy link
Member

@t20100 t20100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

h5f.create_dataset(h5name, data=data)
else:
h5f.create_dataset(h5name, data=data, **create_dataset_args)
except Exception as e:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No way to have a stricter selection of exceptions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reduced it to TypeError only. Ok?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes 👍

@woutdenolf woutdenolf merged commit 6949b8b into silx-kit:main Sep 18, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants