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
_Acquisition.c has specific code for recognising when an Acquisition-wrapped item is being fed in to the Python Pickler, and it throws TypeError: "Can't pickle objects in acquisition wrappers." when this occurs.
The error is very opaque and difficult to track down what, actually, is being erroneously Acquisition wrapped and fed in to the Pickler. A sample (not Production-quality) improvement for this would be something like:
Michael Howitz wrote at 2022-4-12 23:10 -0700:
***@***.*** What do you think about this proposed change?
I, too, had in the past met the error several times and
remember that the analysis was not easy. Therefore, it can be
good to provide more information for this error type.
Regarding the proposed details: I would not unwrap
but directly apply `PyObject_Str|Repr` to the wrapper.
The wrapper's `str|repr` typically provides valuable information
beyond that of the base object (it usually includes the containment
path). I am not sure whether I typically see `repr(wrapper)`
or `str(wrapper)`; that's why I use `str|repr` above;
I would use what has a chance to provide information about the
containment path.
_Acquisition.c
has specific code for recognising when an Acquisition-wrapped item is being fed in to the Python Pickler, and it throws TypeError: "Can't pickle objects in acquisition wrappers." when this occurs.The error is very opaque and difficult to track down what, actually, is being erroneously Acquisition wrapped and fed in to the Pickler. A sample (not Production-quality) improvement for this would be something like:
The text was updated successfully, but these errors were encountered: