oscilloscope icon indicating copy to clipboard operation
oscilloscope copied to clipboard

AttributeError: module 'cloudpickle.cloudpickle' has no attribute 'dumps'

Open jack-the-hack opened this issue 4 years ago • 2 comments

how can i fix this

jack-the-hack avatar Nov 23 '20 01:11 jack-the-hack

I got the same issue using python 3.8 with anaconda. It seems the files cloudpickle.py and cloudpickle_fast.py in ~/opt/anaconda3/lib/python3.8/site-packages/cloudpickle/ don't define the method dumps.

I eventually "fixed" it by replacing the files with some other files of that name (different version?) I found somewhere on my machine (I have no idea how anaconda works). Somewhere being: ~/opt/anaconda3/pkgs/joblib-0.16.0-py_0/site-packages/joblib/externals/cloudpickle/

Now, osc.start() can be run, but after displaying an empty graph it gives me following error:

PicklingError: Can't pickle <function simple_random_signal at 0x120d779d0>: it's not the same object as main.simple_random_signal

Could you help us here, @devxpy ?

felix-albrecht avatar Nov 27 '20 18:11 felix-albrecht

This is a problem in zproc. The patch here (basically open the serializer.py in zproc, and change 'from cloudpickle import cloudpickle' and change to just 'import cloudpickle' seems to fix this situation.

jaytho avatar Apr 19 '21 22:04 jaytho