为了账号安全,请及时绑定邮箱和手机立即绑定

运行是页面报错“__init__() takes 1 positional argument but 2 were given”

TypeError at /index/

__init__() takes 1 positional argument but 2 were given

Request Method:

GET    

Request URL:

http://127.0.0.1:8000/index/    

Django Version:

1.11.2    

Exception Type:

TypeError    

Exception Value:

__init__() takes 1 positional argument but 2 were given
   

Exception Location:

C:\lijin\PY\djangotest\Dtest\views.py in index, line 5    

Python Executable:

C:\Users\0\AppData\Local\Programs\Python\Python36\python.exe    

Python Version:

3.6.1    

Python Path:

['C:\\lijin\\PY\\djangotest',
'C:\\lijin\\PY\\djangotest',
'C:\\Users\\0\\AppData\\Local\\Programs\\Python\\Python36\\python36.zip',
'C:\\Users\\0\\AppData\\Local\\Programs\\Python\\Python36\\DLLs',
'C:\\Users\\0\\AppData\\Local\\Programs\\Python\\Python36\\lib',
'C:\\Users\\0\\AppData\\Local\\Programs\\Python\\Python36',
'C:\\Users\\0\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages']
   

Server time:

Thu, 29 Jun 2017 05:53:05 +0000    


正在回答

1 回答

HttpResponse 写成 HttpRequst了 

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
django入门与实践
  • 参与学习       65159    人
  • 解答问题       869    个

手把手带你进入Django开发的大门,充分领略Django的魅力

进入课程

运行是页面报错“__init__() takes 1 positional argument but 2 were given”

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信