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

ValueError on Windows when loading a repo card with empty YAML #1546

Closed
lhoestq opened this issue Jul 7, 2023 · 3 comments
Closed

ValueError on Windows when loading a repo card with empty YAML #1546

lhoestq opened this issue Jul 7, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@lhoestq
Copy link
Member

lhoestq commented Jul 7, 2023

For example with a dataset card like this

---
---
# Begin of markdown

Some cool dataset card

It fails on windows with ValueError, while on macos and linux we can load the repo card and get and empty DatasetCardData.
This is because the regex used does find a match but it's empty. Therefore yaml.safe_load returns None and we get a ValueError since its not a dict as expected.

ValueError: repo card metadata block should be a dict

This is not super important but makes our CI fail at datasets (I'll just skip a test for now)

@Wauplin Wauplin added the bug Something isn't working label Jul 7, 2023
@Wauplin
Copy link
Contributor

Wauplin commented Jul 7, 2023

Thanks for reporting @lhoestq . Let's make a quick fix even though I'll not make a hot-fix release just for this one.

@lhoestq
Copy link
Member Author

lhoestq commented Jul 7, 2023

yea it's fine, thanks

@Wauplin
Copy link
Contributor

Wauplin commented Jul 7, 2023

Closed by #1547.

@Wauplin Wauplin closed this as completed Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants