学生管理系统自己重新码过后调试报错
发表在Python图书答疑
2019-10-27 悬赏:5 学分
《Python项目开发案例集锦》第1章 学生信息管理系统
是否精华
是
否
版块置顶:
是
否
按照ID查询后报错
Traceback (most recent call last):
File "D:/dream/studentsystem/studentsystem.py", line 255, in <module>
main()
File "D:/dream/studentsystem/studentsystem.py", line 34, in main
search()
File "D:/dream/studentsystem/studentsystem.py", line 166, in search
d = dict(eval(list))
ValueError: dictionary update sequence element #0 has length 1; 2 is required
按照名字查找报错
Traceback (most recent call last):
File "D:/dream/studentsystem/studentsystem.py", line 255, in <module>
main()
File "D:/dream/studentsystem/studentsystem.py", line 34, in main
search()
File "D:/dream/studentsystem/studentsystem.py", line 171, in search
if d['name'] == name:
KeyError: 'name'