Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/345.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 谷歌应用程序引擎类型错误问题_Python_Django_Google App Engine_Typeerror - Fatal编程技术网

Python 谷歌应用程序引擎类型错误问题

Python 谷歌应用程序引擎类型错误问题,python,django,google-app-engine,typeerror,Python,Django,Google App Engine,Typeerror,我使用django在google app engine上开发了一个简单的应用程序,我有两个看起来几乎相同的类,但其中一个类因TypeError崩溃 Traceback (most recent call last): File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3211, in _HandleRequest self._Dispa

我使用django在google app engine上开发了一个简单的应用程序,我有两个看起来几乎相同的类,但其中一个类因TypeError崩溃

Traceback (most recent call last):
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3211, in _HandleRequest
    self._Dispatch(dispatcher, self.rfile, outfile, env_dict)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3154, in _Dispatch
    base_env_dict=env_dict)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 527, in Dispatch
    base_env_dict=base_env_dict)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2404, in Dispatch
    self._module_dict)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2314, in ExecuteCGI
    reset_modules = exec_script(handler_path, cgi_path, hook)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2212, in ExecuteOrImportScript
    script_module.main()
  File "C:\Development\fuluus\momadthenomad\main.py", line 20, in main
    run_wsgi_app(application)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\webapp\util.py", line 97, in run_wsgi_app
    run_bare_wsgi_app(add_wsgi_middleware(application))
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\webapp\util.py", line 115, in run_bare_wsgi_app
    result = application(env, _start_response)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\webapp\__init__.py", line 500, in __call__
    handler = handler_class()
TypeError: NotFoundPage() takes exactly 1 argument (0 given)
我的类看起来像这样(main.py):

当我转到/index.html时,一切都很完美。但是当我转到/not-found.html时,它会因错误而崩溃。我想不出这个脚本有什么问题。也许我忽略了什么。请帮忙

def NotFoundPage(BasePage):
应该是:

class NotFoundPage(BasePage):
应该是:

class NotFoundPage(BasePage):