fix: 转换导入数据列名为字符串以兼容UI#230
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
修复导入学生数据时 DataFrame 列名为整数、而 UI 层按字符串列名访问导致的 KeyError 问题,以提升导入功能与 UI 列映射的兼容性。
Changes:
- 在文件导入完成后,将 DataFrame 的所有列名统一转换为字符串,避免 UI 字符串列名与底层整数列名不匹配。
- 细微调整日志行(当前变更包含行尾字符差异)。
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ) | ||
| else: | ||
| logger.info(f"已保存 {len(all_students)} 名学生到新班级 '{class_name}'") | ||
| logger.info(f"已保存 {len(all_students)} 名学生到新班级 '{class_name}'") |
Contributor
There was a problem hiding this comment.
已按反馈修复,移除了该处多余的 CR 行尾字符,当前仅保留正常换行格式。对应提交:bd80e72。本次没有 UI 变更,因此无截图。
Agent-Logs-Url: https://github.com/SECTL/SecRandom/sessions/842d3339-f0f9-4a9a-9a4f-195e51b4f7c8 Co-authored-by: WSXYT <102407247+WSXYT@users.noreply.github.com>
Copilot stopped work on behalf of
WSXYT due to an error
May 8, 2026 16:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes SECRANDOM-AS. The issue was that: DataFrame column names are integers, but code attempts access using string representations from UI, causing KeyError.
This fix was generated by Seer in Sentry, triggered by wsxyt. 👁️ Run ID: 1259156
Not quite right? Click here to continue debugging with Seer.