Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tools/skills_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ def _write_cache(self, key: str, data: list) -> None:
index_cache_dir.mkdir(parents=True, exist_ok=True)
cache_file = index_cache_dir / f"{key}.json"
try:
cache_file.write_text(json.dumps(data, ensure_ascii=False))
cache_file.write_text(json.dumps(data, ensure_ascii=False), encoding="utf-8")
except OSError as e:
logger.debug("Could not write cache: %s", e)

Expand Down Expand Up @@ -3363,7 +3363,7 @@ def _write_index_cache(key: str, data: Any) -> None:
pass
cache_file = index_cache_dir / f"{key}.json"
try:
cache_file.write_text(json.dumps(data, ensure_ascii=False, default=str))
cache_file.write_text(json.dumps(data, ensure_ascii=False, default=str), encoding="utf-8")
except OSError as e:
logger.debug("Could not write cache: %s", e)

Expand Down Expand Up @@ -3403,7 +3403,7 @@ def load(self) -> dict:

def save(self, data: dict) -> None:
self.path.parent.mkdir(parents=True, exist_ok=True)
self.path.write_text(json.dumps(data, indent=2, ensure_ascii=False) + "\n")
self.path.write_text(json.dumps(data, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")

def record_install(
self,
Expand Down
Loading