2 votes

distributed.protocol.pickle - INFO - Échec de la sérialisation. Exception : Le décapage d'un objet AuthenticationString n'est pas autorisé pour des raisons de sécurité.

Code python : :

from dask.distributed import variable, Client
from multiprocessing import Process, current_process

def my_task(proc):
    print("process object::", proc)

def doubler(number):
    # do stuff returns something

proc = Process(target=doubler, args=(numbers,)) # creating a python process
client = Client()
future = client.submit(my_task, proc)

Lors de l'exécution du code ci-dessus, je reçois une erreur de sérialisation pour l'objet proc. s'il vous plaît aidez-moi à comprendre le problème ici

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

Je ne sais pas ce qui ne va pas ici J'apprécie votre temps et votre aide. Merci.

Prograide.com

Prograide est une communauté de développeurs qui cherche à élargir la connaissance de la programmation au-delà de l'anglais.
Pour cela nous avons les plus grands doutes résolus en français et vous pouvez aussi poser vos propres questions ou résoudre celles des autres.

Powered by:

X