2011-12-13 54 views
0

当试图在Google Appengine Python27 SDK(在Python 2.5上运行良好)上启动简单的推送队列任务时,我现在得到的跟踪结尾为:无法在Google Appengine上使用Python27 SDK运行推送队列任务

File "c:\program files\google\google_appengine\google\appengine\api\taskqueue\ 
    taskqueue_stub.py", line 1662, in ExecuteTask connection.putheader(header_key, header_value) 

File "C:\Python27\lib\httplib.py", line 924, in putheader str = '%s: %s' % (header, '\r\n\t'.join(values)) 

TypeError: sequence item 0: expected string, int found 

上述类型错误发生用于

header = 'Content-Length' 

values = (112,) 

这显然应值=( '112',)

感激的任何建议,

莫特

回答

1

看起来像一个错误,据报道:Issue 6460: Development Server - taskqueue stub type error

得到它的工作,你需要手动补丁的SDK,文件:谷歌/应用服务引擎/ API /任务队列/ taskqueue_stub。 PY,线,看起来像:

headers.append(('Content-Length', len(task.body()))) 

修复程序:

headers.append(('Content-Length', str(len(task.body())))) 
+0

非常感谢。这是它的工作。我在两个地方做了补丁:239行1623行 – MortCanty

相关问题