From 4f0f2b003383494389abd859381e1868fc8e96d1 Mon Sep 17 00:00:00 2001 From: "seer-by-sentry[bot]" <157164994+seer-by-sentry[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 16:32:48 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BD=AC=E6=8D=A2=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=88=97=E5=90=8D=E4=B8=BA=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=B2=E4=BB=A5=E9=81=BF=E5=85=8DUI=E5=B1=82=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/another_window/student/import_student_name.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/view/another_window/student/import_student_name.py b/app/view/another_window/student/import_student_name.py index 2ddd3e30..dca6aa33 100644 --- a/app/view/another_window/student/import_student_name.py +++ b/app/view/another_window/student/import_student_name.py @@ -450,6 +450,9 @@ def __load_file(self, file_path: str): ) # 获取列名 + # 将所有列名转换为字符串,避免整数列名与UI层字符串不匹配的问题 + data.columns = [str(col) for col in data.columns] + columns = list(data.columns) # 通过信号通知UI线程文件加载完成 @@ -938,4 +941,4 @@ def __save_student_data(self, class_name: str, student_data: List[Dict[str, Any] f"已覆盖班级 '{class_name}' 的数据,共 {len(all_students)} 名学生" ) else: - logger.info(f"已保存 {len(all_students)} 名学生到新班级 '{class_name}'") + logger.info(f"已保存 {len(all_students)} 名学生到新班级 '{class_name}'")