diff --git a/json_to_md.py b/json_to_md.py index 7e1e5ca..a5d6a8a 100644 --- a/json_to_md.py +++ b/json_to_md.py @@ -366,6 +366,7 @@ def run_pytest_and_generate_banner_with_logs(md_path, log_path, exit_code): try: with open(md_path, "w") as f: + full_banner = full_banner.encode('utf-8', 'ignore').decode('utf-8') f.write(full_banner + original_md) print("✅ Banner and log summary added to markdown report.") except Exception as e: