我在尝试使用 PP 时遇到了多个问题。我正在运行 python2.6 和 pp 1.6.0 rc3。使用以下测试代码:
import pp
nodes=('mosura02','mosura03','mosura04','mosura05','mosura06',
'mosura09','mosura10','mosura11','mosura12')
def pptester():
js=pp.Server(ppservers=nodes)
tmp=[]
for i in range(200):
tmp.append(js.submit(ppworktest,(),(),('os',)))
return tmp
def ppworktest():
return os.system("uname -a")
给我以下结果:
在 [10] 中:线程 run_local 中的异常: 回溯(最近一次通话最后): 文件“/usr/lib64/python2.6/threading.py”,第 525 行,在 __bootstrap_inner 自我运行() 运行中的文件“/usr/lib64/python2.6/threading.py”,第 477 行 self.__target(*self.__args, **self.__kwargs) _run_local 中的文件“/home/wkerzend/python_coala/lib/python2.6/site-packages/pp.py”,第 751 行 job.finalize(结果) UnboundLocalError:分配前引用的局部变量“结果” 线程 run_local 中的异常: 回溯(最近一次通话最后): 文件“/usr/lib64/python2.6/threading.py”,第 525 行,在 __bootstrap_inner 自我运行() 运行中的文件“/usr/lib64/python2.6/threading.py”,第 477 行 self.__target(*self.__args, **self.__kwargs) _run_local 中的文件“/home/wkerzend/python_coala/lib/python2.6/site-packages/pp.py”,第 751 行 job.finalize(结果) UnboundLocalError:分配前引用的局部变量“结果” 线程 run_local 中的异常: 回溯(最近一次通话最后): 文件“/usr/lib64/python2.6/threading.py”,第 525 行,在 __bootstrap_inner 自我运行() 运行中的文件“/usr/lib64/python2.6/threading.py”,第 477 行 self.__target(*self.__args, **self.__kwargs) _run_local 中的文件“/home/wkerzend/python_coala/lib/python2.6/site-packages/pp.py”,第 751 行 job.finalize(结果) UnboundLocalError:分配前引用的局部变量“结果” 线程 run_local 中的异常: 回溯(最近一次通话最后): 文件“/usr/lib64/python2.6/threading.py”,第 525 行,在 __bootstrap_inner 自我运行() 运行中的文件“/usr/lib64/python2.6/threading.py”,第 477 行 self.__target(*self.__args, **self.__kwargs) _run_local 中的文件“/home/wkerzend/python_coala/lib/python2.6/site-packages/pp.py”,第 751 行 job.finalize(结果) UnboundLocalError:分配前引用的局部变量“结果”
任何帮助是极大的赞赏。