Skip to content

Commit

Permalink
Catch OSErrors in HuggingFaceDatasetSaver._deserialize_components (#…
Browse files Browse the repository at this point in the history
…9078)

* Update flagging.py

* add changeset

---------

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 12, 2024
1 parent 5350f1f commit 1a9d729
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/better-results-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gradio": patch
---

fix:Catch OSErrors in `HuggingFaceDatasetSaver._deserialize_components`
2 changes: 1 addition & 1 deletion gradio/flagging.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def _deserialize_components(
if not deserialized_path.exists():
raise FileNotFoundError(f"File {deserialized} not found")
row.append(str(deserialized_path.relative_to(self.dataset_dir)))
except (FileNotFoundError, TypeError, ValueError):
except (FileNotFoundError, TypeError, ValueError, OSError):
deserialized = "" if deserialized is None else str(deserialized)
row.append(deserialized)

Expand Down

0 comments on commit 1a9d729

Please sign in to comment.