Skip to content

Commit 01b01d0

Browse files
committed
fix: Add UTF-8 encoding to temp file for Windows compatibility
1 parent 887e3fa commit 01b01d0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

smoltrace/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ def upload_dataset_card(
6565
# Create a temporary file with the card content
6666
import tempfile
6767

68-
with tempfile.NamedTemporaryFile(mode="w", suffix=".md", delete=False) as f:
68+
with tempfile.NamedTemporaryFile(
69+
mode="w", suffix=".md", delete=False, encoding="utf-8"
70+
) as f:
6971
f.write(card_content)
7072
temp_path = f.name
7173

@@ -1428,7 +1430,7 @@ def copy_standard_datasets(
14281430
print(" [OK] Copied successfully")
14291431

14301432
# Generate and upload dataset card
1431-
print(f" [3/3] Uploading dataset card...")
1433+
print(" [3/3] Uploading dataset card...")
14321434
if ds["name"] == "smoltrace-benchmark-v1":
14331435
card_content = generate_benchmark_card(
14341436
username=username,

0 commit comments

Comments
 (0)