Axeia / KeyboardGenerator

A macro for FreeCAD that creates a keyboard plate based on input from keyboard-layout-editor.com
4 stars 1 forks source link

Macro errors to run FreeCAD 0.21.2 #4

Open RivasMario opened 4 months ago

RivasMario commented 4 months ago

Loaded macro into FreeCad and failed to launch. Received below error message. Including Json used below.

01:43:11  QLayout: Attempting to add QLayout "" to QWidget "", which already has a layout
01:43:11  QLayout: Attempting to add QLayout "" to QWidget "", which already has a layout
01:43:11  QLayout::addChildLayout: layout "" already has a parent
01:43:11  QLayout: Attempting to add QLayout "" to UiDialog "", which already has a layout
01:43:11  Traceback (most recent call last):
  File "C:/Users/Mario/AppData/Roaming/FreeCAD/Macro/KeyboardGenerator/KeyboardGenerator.FCMacro", line 66, in <module>
    d = Dialog.UiDialog(__Name__, __Version__, userJSONFile)  # Extends QDialog
  File "C:\Users\Mario\AppData\Roaming\FreeCAD\Macro\KeyboardGenerator\KeyboardGenerator\Dialog.py", line 500, in __init__
    self.setupUi()
  File "C:\Users\Mario\AppData\Roaming\FreeCAD\Macro\KeyboardGenerator\KeyboardGenerator\Dialog.py", line 572, in setupUi
    self.__addSettingsPageUi()
  File "C:\Users\Mario\AppData\Roaming\FreeCAD\Macro\KeyboardGenerator\KeyboardGenerator\Dialog.py", line 660, in __addSettingsPageUi
    self.reloadSettingsPreview()
  File "C:\Users\Mario\AppData\Roaming\FreeCAD\Macro\KeyboardGenerator\KeyboardGenerator\Dialog.py", line 681, in reloadSettingsPreview
    parsedKb = serial.parse(r'[[{a:7},"P","r","e","v","i","e","w"]]')
  File "C:\Users\Mario\AppData\Roaming\FreeCAD\Macro\KeyboardGenerator\KeyboardGenerator\pykle_serial\serial.py", line 241, in parse
    import json5
  File "C:\Users\Mario\AppData\Local\Programs\FreeCAD 0.21\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
<class 'ModuleNotFoundError'>: No module named 'json5'
giulioPerissi commented 4 months ago

Hi, same problem as you, I'm on Linux Mint 21 with Cinnamon running FreeCad 0.21.1 installed with AppImage (I doubt that this will cause differences, except for the version of FreeCad). Is there a place where the Macro save the config? It's more annoying but surely batter than not working. Thanks in advice