I imported pickle from copyreg. I then use the attribute dumps to convert a dictionary into bytes b'\x80\x04...' but it results in the error shown below:
from copyreg import pickle
d={"name":value}
d=pickle.dumps(d)
Error:
AttributeError: 'function' object has no attribute