diff --git a/skrub/_reporting/_table_report.py b/skrub/_reporting/_table_report.py index 2842dda81..aa933655a 100644 --- a/skrub/_reporting/_table_report.py +++ b/skrub/_reporting/_table_report.py @@ -226,7 +226,7 @@ def write_html(self, file): if (encoding := getattr(file, "encoding", None)) is not None: try: encoding_name = codecs.lookup(encoding).name - except LookupError: + except LookupError: # pragma: no cover encoding_name = None if encoding_name != "utf-8": raise ValueError(