首页 新闻 赞助 找找看

AttributeError: module 'cgi' has no attribute 'FieldStorage'大神帮看看什么解决?

0
[已解决问题] 解决于 2017-10-22 13:08

是不是要FieldStorage?

 1 import cgi
 2 
 3 import athletemodel
 4 import yate
 5 
 6 atheletes = athletemodel.get_from_store()
 7 
 8 form_data = cgi.FieldStorage()
 9 athlete_name = form_data['which_athlete'].value
10 
11 print(yate.start_response())
12 print(yate.include_header("Coach Kelly's Timing data"))
13 print(yate.header("Athlete:"+ athlete_name+"'s DOB:"+athlete[athlete_name].dob + "."))
14 print(yate.para("The top times for this athlete are:"))
15 print(yate.u_list(athlete[athlete_name].top3))
16 print(yate.include_footer({"Home":"/index.html","select another athlete":"generate_list.py"}))
dang幸福来敲门的主页 dang幸福来敲门 | 初学一级 | 园豆:177
提问于:2017-08-31 10:36
< >
分享
最佳答案
0

我直接跑这两句,没问题

import cgi

form_data = cgi.FieldStorage()

 

你是不是自己创建了一个文件,叫cgi.py

奖励园豆:5
Masako | 小虾三级 |园豆:1893 | 2017-09-29 11:03
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册