Open SGR-FA opened 3 months ago
TraitError: The 'rotation' trait of a GridHelper instance contains an Enum of an Euler which expected any of ['XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX'], not the str 'xyz'. 我也是这个报错你是用啥解决的
Hi,
(please translate, I greatly lack ability to speak/write in this language)
Unfortunately, trials and errors forced me to use the rotateX
method.
class CustomJupyterRenderer(JupyterRenderer):
...
self.my_grid = Grid(bb_center=self._bb.center, maximum=bb_max,
colorCenterLine='#aaa', colorGrid='#ddd')
...
# raises error for now: self.my_grid.set_rotation(((math.pi / 2.0), 0, 0, "XYZ"))
self.my_grid.grid.rotateX(math.pi / 2.0)
...
BR
TraitError: The 'rotation' trait of a GridHelper instance contains an Enum of an Euler which expected any of ['XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX'], not the str 'xyz'. 我也是这个报错你是用啥解决的
FYI, there is an ongoing fix thanks to @vidartf : see issue on jupyter-widgets/pythreejs
Hi,
First of all, thank you all for your great work !!
I'm upgrading from an old Python 3.8 venv but unfortunately I get this message when I try to open a viewer in my notebooks. For now, I'm completely stuck but as I understood, the "XYZ" value of the Euler rotation gets lowercased somewhere during the Jupyter traits/session/zmqstream/socket communication. It could be during any of the cast, from_json, to_json, send_multipart or recv_multipart steps but I have not managed to find which one :( and I get the same TraitError for any other version of python/occt/ifcopenshell...
Does anyone also experience this or did I miss something?
Here is the venv :
Here is an example to get the error:
Here is the output
Thank you for your help.