【问题标题】:NoneType error while using gae and gaesessions in python 2.7在 python 2.7 中使用 gae 和 gaesessions 时出现 NoneType 错误
【发布时间】:2012-08-19 14:49:40
【问题描述】:

我最近尝试将我的 GAE 项目从 python2.5 迁移到 python2.7。不幸的是,我在 gaesessions 所需的 appengine_config.py 文件中遇到了一些问题。

我不知道问题是在 GAE 方面还是在会话方面,但现在我认为它在会话方面,因为我能够打印出 environ 变量,但不是 my_start_response 变量的类型,而玩弄问题所在。

问题来了:

Traceback (most recent call last):
  File "c:\Program Files (x86)\Google\google_appengine\google\appengine\runtime\wsgi.py", line 195, in Handle
    result = handler(dict(self._environ), self._StartResponse)
  File "d:\Documents\dna_manip\gaesessions\__init__.py", line 472, in __call__
    return self.app(environ, my_start_response)
TypeError: 'NoneType' object is not callable

以前有没有人处理过这个问题?我觉得我在迁移项目时搞砸了。

【问题讨论】:

    标签: python google-app-engine web.py


    【解决方案1】:

    没关系 - 我搞砸了。在google app engine上使用web.py和python2.7时,需要使用application.wsgifunc()函数,而不是application.cgirun()

    【讨论】:

      猜你喜欢
      • 2012-11-13
      • 2020-09-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-01
      • 2011-08-26
      • 1970-01-01
      相关资源
      最近更新 更多