I am trying to parallelize a protobuf application
one instance in each thread but I am getting this error
/usr/local/lib/python3.10/dist-packages/google/protobuf/internal/containers.py",
line 250, in __reduce__
raise pickle.PickleError("Can't pickle repeated scalar fields, convert
to list first")
I compiled protobuf
./configure CPPFLAGS="-DGOOGLE_PROTOBUF_NO_THREAD_SAFETY"
def __reduce__(self, **kwargs) -> NoReturn:
# Convert repeated scalar fields to lists
raise pickle.PickleError("Can't pickle repeated scalar fields, convert
to list first")
def add(self, **kwargs: Any) -> _T:
"""Adds a new element at the end of the list and returns it. Keyword
arguments may be used to initialize the element.
"""
new_element = self._message_descriptor._concrete_class(**kwargs)
new_element._SetListener(self._message_listener)
self._values.append(new_element)
if not self._message_listener.dirty:
self._message_listener.Modified()
return new_element
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/protobuf/0bb20be8-902b-434d-bfe4-1e97400a9626n%40googlegroups.com.