alejandroautalan / pygubu

A simple GUI builder for the python tkinter module
MIT License
2.04k stars 214 forks source link

fix: TypeError: the JSON object must be str, bytes or bytearray, not … #248

Closed larryw3i closed 3 years ago

larryw3i commented 3 years ago

fix: Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.9/tkinter/init.py", line 1892, in call return self.func(*args) File "/home/larry/.local/lib/python3.9/site-packages/pygubudesigner/bindingseditor.py", line 74, in _on_cell_edited self._copy_to_data() File "/home/larry/.local/lib/python3.9/site-packages/pygubudesigner/bindingseditor.py", line 88, in _copy_to_data self._curr_data.notify(self) File "/home/larry/.local/lib/python3.9/site-packages/pygubudesigner/util/observable.py", line 39, in notify observer.update_event(hint, self) File "/home/larry/.local/lib/python3.9/site-packages/pygubudesigner/uitreeeditor.py", line 754, in update_event self.draw_widget(item) File "/home/larry/.local/lib/python3.9/site-packages/pygubudesigner/uitreeeditor.py", line 253, in draw_widget uidef = self.tree_to_uidef(item) File "/home/larry/.local/lib/python3.9/site-packages/pygubudesigner/uitreeeditor.py", line 353, in tree_to_uidef node = self.build_uidefinition(uidef, '', treeitem) File "/home/larry/.local/lib/python3.9/site-packages/pygubudesigner/uitreeeditor.py", line 368, in build_uidefinition child_node = self.build_uidefinition(uidef, item, child) File "/home/larry/.local/lib/python3.9/site-packages/pygubudesigner/uitreeeditor.py", line 368, in build_uidefinition child_node = self.build_uidefinition(uidef, item, child) File "/home/larry/.local/lib/python3.9/site-packages/pygubudesigner/uitreeeditor.py", line 364, in build_uidefinition node = uidef.widget_to_xmlnode(self.treedata[item]) File "/home/larry/.local/lib/python3.9/site-packages/pygubu/builder/uidefinition.py", line 219, in widget_to_xmlnode pnode = self._prop_to_xml(pkey, wmeta.properties[pkey]) File "/home/larry/.local/lib/python3.9/site-packages/pygubu/builder/uidefinition.py", line 196, in _prop_to_xml dv = json.loads(pvalue) File "/usr/lib/python3.9/json/init.py", line 339, in loads raise TypeError(f'the JSON object must be str, bytes or bytearray, ' TypeError: the JSON object must be str, bytes or bytearray, not NoneType