Skip to content

Commit 08bc5eb

Browse files
tomaarsenabidlabsgradio-pr-bot
authored
Fix Windows-only emoji mojibake when uploading Space README (#533)
Co-authored-by: Abubakar Abid <abubakar@huggingface.co> Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
1 parent e7ed176 commit 08bc5eb

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/bright-otters-attack.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trackio": minor
3+
---
4+
5+
feat:Fix Windows-only emoji mojibake when uploading Space README

trackio/deploy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ def deploy_as_space(
357357
if bucket_id is not None:
358358
create_bucket_if_not_exists(bucket_id, private=private)
359359

360-
with open(Path(trackio_path, "README.md"), "r") as f:
360+
with open(Path(trackio_path, "README.md"), "r", encoding="utf-8") as f:
361361
readme_content = f.read()
362362
readme_content = readme_content.replace("sdk_version: {GRADIO_VERSION}\n", "")
363363
readme_content = readme_content.replace("{APP_FILE}", "app.py")

0 commit comments

Comments
 (0)