You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently developing some tools with Disco (v0.4.5) to automate a few repetitive tasks and I came across a problem while using virtualenv. I created a very simple MR job that reproduces the problem I'm currently experiencing:
The error that I get just after dispatching the job is:
2015/01/21 19:00:25 master map:0 assigned to revert-slave-3
2015/01/21 19:00:26 master ERROR: Job failed: Worker at 'revert-slave-3' died: Traceback (most recent call last):
File "/mnt/ebs/disco/data/host-3/37/wordcount@58d:d3a09:d5dfa/Library/Python/2.7/site-packages/disco/worker/__init__.py", line 335, in main
task = cls.get_task()
File "/mnt/ebs/disco/data/host-3/37/wordcount@58d:d3a09:d5dfa/Library/Python/2.7/site-packages/disco/worker/__init__.py", line 385, in get_task
return Task(**dict((str(k), v) for k, v in cls.send('TASK').items()))
File "/mnt/ebs/disco/data/host-3/37/wordcount@58d:d3a09:d5dfa/Library/Python/2.7/site-packages/disco/task.py", line 67, in __init__
self.jobobjs = dPickle.loads(self.jobpack.jobdata)
File "/Users/xxx/Development/project/env/lib/python2.7/re.py", line 229, in _compile
NameError: ("global name '_cache' is not defined", <function _compile at 0x14d9b90>, ('(?P<option>[^:=\\s][^:=]*)\\s*(?P<vi>[:=])\\s*(?P<value>.*)$', 0))
2015/01/21 19:00:26 master WARN: Job killed
Status: [map] 1 waiting, 0 running, 0 done, 1 failed
It seems that Disco is trying to pickle the function _compile from the re.py module. I did some debugging and figured out the method dPickle.save_func() is not correctly detecting re._compile as a standard library function when virtualenv is activated.
I fixed the problem patching the dPickle.is_std() method as follows:
Hi,
I'm currently developing some tools with Disco (v0.4.5) to automate a few repetitive tasks and I came across a problem while using virtualenv. I created a very simple MR job that reproduces the problem I'm currently experiencing:
The error that I get just after dispatching the job is:
It seems that Disco is trying to pickle the function
_compile
from there.py
module. I did some debugging and figured out the method dPickle.save_func() is not correctly detectingre._compile
as a standard library function when virtualenv is activated.I fixed the problem patching the dPickle.is_std() method as follows:
This is kind of ugly and not very robust solution in my opinion. I would appreciate your input on how it could be improved.
Thanks,
The text was updated successfully, but these errors were encountered: