diff --git a/qt.py b/qt.py index e9ba575..2068338 100644 --- a/qt.py +++ b/qt.py @@ -4032,8 +4032,8 @@ class BalCalendar: @staticmethod def write_temp_ics(content): fd, path = tempfile.mkstemp(prefix="event_", suffix=".ics") - with os.fdopen(fd, "wb", encoding="utf-8") as f: - f.write(content) + with os.fdopen(fd, "wb") as f: + f.write(content.encode("utf-8")) return path @staticmethod