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
I was trying to pickle a State machine in order to save it on a file to be executed later and I saw that it cannot be pickled due to the _state_transitioning_lock variable. This could be fixed by adding the following to the state_machine class:
def __getstate__(self):
return {k:v for (k, v) in self.__dict__.items() if k is not "_state_transitioning_lock"}
def __setstate__(self, d):
self.__dict__ = d
self._state_transitioning_lock = threading.Lock()
The text was updated successfully, but these errors were encountered:
InigoMoreno
added a commit
to InigoMoreno/executive_smach
that referenced
this issue
Aug 5, 2021
I was trying to pickle a State machine in order to save it on a file to be executed later and I saw that it cannot be pickled due to the
_state_transitioning_lock
variable. This could be fixed by adding the following to the state_machine class:The text was updated successfully, but these errors were encountered: