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
>>> import cloudpickle
>>> dct = {'a': 1}
>>> getter = dct.get
>>> cloudpickle.dumps(getter)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/cloudpickle/cloudpickle.py", line 873, in dumps
cp.dump(obj)
File "/usr/local/lib/python3.6/site-packages/cloudpickle/cloudpickle.py", line 268, in dump
return Pickler.dump(self, obj)
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pickle.py", line 409, in dump
self.save(obj)
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/local/lib/python3.6/site-packages/cloudpickle/cloudpickle.py", line 621, in save_builtin_function
return self.save_function(obj)
File "/usr/local/lib/python3.6/site-packages/cloudpickle/cloudpickle.py", line 340, in save_function
if obj in _BUILTIN_TYPE_CONSTRUCTORS:
TypeError: unhashable type: 'dict'
Functions cannot be hashed if their closure contains unhashable objects.
Line 340 needs to be wrapped in a try/except block.
The text was updated successfully, but these errors were encountered:
@ogrisel unfortunately I can't contribute before acquiring approval from my company. Doing that would require some time, it may be faster for someone else to fix it.
cloudpickle/cloudpickle/cloudpickle.py
Line 340 in abeb3fb
Functions cannot be hashed if their closure contains unhashable objects.
Line 340 needs to be wrapped in a try/except block.
The text was updated successfully, but these errors were encountered: