python code ::
distributed.protocol.pickle - INFO - Failed to serialize (<Process(Process-1, initial)>,). Exception: Pickling an AuthenticationString object is disallowed for security reasons
Traceback (most recent call last):
File "stop_task.py", line 42, in <module>
future = client.submit(my_task, proc)
File "/usr/lib/python2.7/site-packages/distributed/client.py", line 1121, in submit
retries={skey: retries} if retries else None)
File "/usr/lib/python2.7/site-packages/distributed/client.py", line 1954, in _graph_to_futures
'tasks': valmap(dumps_task, dsk3),
File "/usr/lib/python2.7/site-packages/toolz/dicttoolz.py", line 84, in valmap
rv.update(zip(iterkeys(d), map(func, itervalues(d))))
File "/usr/lib/python2.7/site-packages/distributed/worker.py", line 703, in dumps_task
'args': pickle.dumps(task[1:])}
File "/usr/lib/python2.7/site-packages/distributed/protocol/pickle.py", line 51, in dumps
return cloudpickle.dumps(x, protocol=pickle.HIGHEST_PROTOCOL)
File "/usr/lib/python2.7/site-packages/cloudpickle/cloudpickle.py", line 881, in dumps
cp.dump(obj)
File "/usr/lib/python2.7/site-packages/cloudpickle/cloudpickle.py", line 268, in dump
return Pickler.dump(self, obj)
File "/usr/lib64/python2.7/pickle.py", line 224, in dump
self.save(obj)
File "/usr/lib64/python2.7/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib64/python2.7/pickle.py", line 548, in save_tuple
save(element)
File "/usr/lib64/python2.7/pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
File "/usr/lib64/python2.7/pickle.py", line 419, in save_reduce
save(state)
File "/usr/lib64/python2.7/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib64/python2.7/pickle.py", line 649, in save_dict
self._batch_setitems(obj.iteritems())
File "/usr/lib64/python2.7/pickle.py", line 681, in _batch_setitems
save(v)
File "/usr/lib64/python2.7/pickle.py", line 306, in save
rv = reduce(self.proto)
File "/usr/lib64/python2.7/multiprocessing/process.py", line 290, in __reduce__
'Pickling an AuthenticationString object is '
TypeError: Pickling an AuthenticationString object is disallowed for security reasons
运行上面的代码后,我收到了proc对象的序列化错误。请帮我解决这个问题..
config_plugins
不确定这里出了什么问题..感谢您的时间和帮助..谢谢..
答案 0 :(得分:1)
看起来Process
个对象不可序列化。这并不奇怪。一台计算机上的Process
无法很好地转换为其他计算机上的进程。这种对象太难移动,因此无法序列化。