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
We recently upgraded traitsui: 6.1.3-5 --> 7.0.0-1. The following code fails on the newer version but runs fine on the older:
>>> import pickle
>>> from traitsui.theme import Theme
>>> theme = Theme()
>>> pickle.dumps(theme)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "...traits/has_traits.py", line 1230, in __reduce_ex__
return (__newobj__, (self.__class__,), self.__getstate__())
File "...traits/has_traits.py", line 1194, in __getstate__
result = self.trait_get(transient=is_none)
File "...traits/has_traits.py", line 1298, in trait_get
value = getattr(self, name, missing)
File "...traitsui/theme.py", line 69, in _get_content_color
import wx
ModuleNotFoundError: No module named 'wx'
Full context
We have a tree editor for which some nodes have color icons. The color nodes specifically fail to be draggable (into an IPython shell for example) because of the pickling failure above.
The text was updated successfully, but these errors were encountered:
I think the immediate fix for this is easy (fix the methods so they aren't wx-specific), but I'm also fairly comfortable saying that when a tree node is serialized for drag and drop, we shouldn't be accidentally getting a Theme object along for the ride. Can you give a little more context of your set up.
Also, Themes really, really, really need to die, but that's secondary.
We recently upgraded traitsui:
6.1.3-5 --> 7.0.0-1
. The following code fails on the newer version but runs fine on the older:Full context
We have a tree editor for which some nodes have color icons. The color nodes specifically fail to be draggable (into an IPython shell for example) because of the pickling failure above.
The text was updated successfully, but these errors were encountered: