我试图将我的App Engine应用程序移动到Python 2.7运行时。使用deferred.defer与Python 2.7
使用SDK版本1.6.5导入google.appengine.ext.deferred
库时,我看到下面的回溯。我也尝试上传应用程序,并在运行时看到类似的错误。
没有其他人使用Python 2.7的延期库。有没有人看过类似的问题?
编辑
要回答我的问题。我的应用程序有自己的版本webapp2
(也许是一个旧版本)删除此问题,并将webapp2
添加到app.yaml
的库部分,解决了此问题。虽然,我不太确定为什么追溯似乎显示延期库导入webapp
的正确版本。
回溯: ...
File ".../units/unitsSchema/styleModel.py", line 30, in <module>
from google.appengine.ext import deferred
File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/deferred/__init__.py", line 29, in <module>
from deferred import *
File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/deferred/deferred.py", line 266, in <module>
class TaskHandler(webapp.RequestHandler):
AttributeError: 'module' object has no attribute 'RequestHandler'
谢谢,我确实推迟了:在我的app.yaml内置部分 – user1373591
回答我自己的问题。我的应用程序有自己的'webapp2'版本(可能是旧版本),删除了这个版本,并将'webapp2'添加到'app.yaml'的'库'部分,解决了这个问题。虽然,我不太清楚为什么。 – user1373591