feat: calendar eco
This commit is contained in:
@@ -1,4 +1,16 @@
|
||||
import os
|
||||
import sys
|
||||
# Windows consoles default to a legacy codepage (cp1252/cp850) that can't encode
|
||||
# the arrows/checkmarks/emojis used throughout this codebase's print() calls —
|
||||
# an uncaught UnicodeEncodeError on a background thread (e.g. the calendar sync
|
||||
# loop) silently kills that task with no visible error. UTF-8 + replace makes
|
||||
# every print() safe regardless of console codepage.
|
||||
if sys.platform == "win32":
|
||||
for _stream in (sys.stdout, sys.stderr):
|
||||
try:
|
||||
_stream.reconfigure(encoding="utf-8", errors="replace")
|
||||
except Exception:
|
||||
pass
|
||||
from pathlib import Path
|
||||
from dotenv import load_dotenv
|
||||
# Explicit path: don't rely on the process's current working directory (a systemd
|
||||
|
||||
Reference in New Issue
Block a user