From d5cf296867731c09f25f508c279d4082e67a7890 Mon Sep 17 00:00:00 2001 From: starfall <1186454801@qq.com> Date: Mon, 25 Nov 2024 18:04:33 +0800 Subject: [PATCH] fix --- excore/_misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/excore/_misc.py b/excore/_misc.py index fd5d37c..0fb0eb5 100644 --- a/excore/_misc.py +++ b/excore/_misc.py @@ -26,7 +26,7 @@ def _create_table( prefix: str = "\n", **tabel_kwargs: Any, ) -> str: - if isinstance(contents[0], str): + if len(contents) > 0 and isinstance(contents[0], str): contents = [(i,) for i in contents] # type: ignore if header is None: header = ()