local variable 'sresult' referenced before assignment

Posted by user288558 on Stack Overflow See other posts from Stack Overflow or by user288558
Published on 2010-04-11T06:20:44Z Indexed on 2010/04/11 6:23 UTC
Read the original article Hit count: 620

Filed under:
|
|

I have had multiple problems trying to use PP. I am running python2.6 and pp 1.6.0 rc3. Using the following test code:

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")

gives me the following result:

In [10]: Exception in thread run_local: Traceback (most recent call last): File "/usr/lib64/python2.6/threading.py", line 525, in __bootstrap_inner self.run() File "/usr/lib64/python2.6/threading.py", line 477, in run self.__target(*self.__args, **self.__kwargs) File "/home/wkerzend/python_coala/lib/python2.6/site-packages/pp.py", line 751, in _run_local job.finalize(sresult) UnboundLocalError: local variable 'sresult' referenced before assignment

Exception in thread run_local: Traceback (most recent call last): File "/usr/lib64/python2.6/threading.py", line 525, in __bootstrap_inner self.run() File "/usr/lib64/python2.6/threading.py", line 477, in run self.__target(*self.__args, **self.__kwargs) File "/home/wkerzend/python_coala/lib/python2.6/site-packages/pp.py", line 751, in _run_local job.finalize(sresult) UnboundLocalError: local variable 'sresult' referenced before assignment

Exception in thread run_local: Traceback (most recent call last): File "/usr/lib64/python2.6/threading.py", line 525, in __bootstrap_inner self.run() File "/usr/lib64/python2.6/threading.py", line 477, in run self.__target(*self.__args, **self.__kwargs) File "/home/wkerzend/python_coala/lib/python2.6/site-packages/pp.py", line 751, in _run_local job.finalize(sresult) UnboundLocalError: local variable 'sresult' referenced before assignment

Exception in thread run_local: Traceback (most recent call last): File "/usr/lib64/python2.6/threading.py", line 525, in __bootstrap_inner self.run() File "/usr/lib64/python2.6/threading.py", line 477, in run self.__target(*self.__args, **self.__kwargs) File "/home/wkerzend/python_coala/lib/python2.6/site-packages/pp.py", line 751, in _run_local job.finalize(sresult)

UnboundLocalError: local variable 'sresult' referenced before assignment

any help greatly appreciated

© Stack Overflow or respective owner

Related posts about python

Related posts about parallel-python