Multiprocessing PicklingError

I am sorry that I can not reproduce my error because my code is too complex.
When I try to train a model, I got the following error.

Traceback (most recent call last):
  File "/home/xxx/.conda/envs/env_name/lib/python3.8//", line 239, in _feed
    obj = _ForkingPickler.dumps(obj)
  File "/home/xxx/.conda/envs/env_name/lib/python3.8/multiprocessing/", line 51, in dumps
    cls(buf, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <class 'numpy.core._exceptions.UFuncTypeError'>: it's not the same object as numpy.core._exceptions.UFuncTypeError

I cannot locate the location of the error. Can anyone give some advice about what’s the type of this error?

This type of error is raised by Python’s multiprocessing library, when it’s unable to pickle certain classes and seems to be related to this issue, which crashes if numpy tries to raise an exception. Based on the discussion in the issue it seems this was fixed on Dec 4, 2020 in numpy.