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
{{ message }}
Repository navigation
Function Pickling: 'NoneType' has no attribute __bool__ #2291
distributed.worker - WARNING - Could not deserialize task
Traceback (most recent call last):
File ".../distributed/worker.py", line 1385, in add_task
self.tasks[key] = _deserialize(function, args, kwargs, task)
File ".../distributed/worker.py", line 801, in _deserialize
function= pickle.loads(function)
File ".../distributed/protocol/pickle.py", line 59, in loads
return pickle.loads(x)
AttributeError: type object 'NoneType' has no attribute '__bool__'
Traceback (most recent call last):
File ".../scratches/scratch_7.py", line 22, in<module>main()
File ".../scratches/scratch_7.py", line 17, in main
print(client.submit(f2).result())
File ".../distributed/client.py", line 195, in result
six.reraise(*result)
File ".../six.py", line 692, in reraise
raise value.with_traceback(tb)
File ".../distributed/protocol/pickle.py", line 59, in loads
return pickle.loads(x)
AttributeError: type object 'NoneType' has no attribute '__bool__'
From distributed's point of view, the type hints will not get used, since the point of pickling is to execute only. I wonder if there's a single way to strip the type information before pickling.
Activity
martindurant commentedon Oct 5, 2018
From distributed's point of view, the type hints will not get used, since the point of pickling is to execute only. I wonder if there's a single way to strip the type information before pickling.
mrocklin commentedon Oct 5, 2018
Dask relies on cloudpickle for function serialization. I recommend asking questions there.
For this particular question it may have already come up and been resolved. See cloudpipe/cloudpickle#193 . It looks like there hasn't been a release since then though. You could try on cloudpickle master and, if that doesn't work, raise a new issue at https://github.com/cloudpipe/cloudpickle/issues/new