Closed xerhaxs closed 2 years ago
Just tested this out; looks like I'm having the same issue.
Some additional info:
The macro configuration config values get kind of messed up when this happens. I'm guessing the NoneType error has to do with grabbing those unexpected values.
Here's a snippet of what an older working single-key configuration looks like:
MACRO_2:
name: GameMenu
string: '-'
type: key
value: [1, 12]
versus the one I created just now through the GUI:
MACRO_6:
gamemode: 0
name: [1, 12]
string: key
type: ''
value: '-'
However, the interface will still crash if I visit any "fixed" single-key profile more than once, giving the same error message as @xerhaxs posted.
In case it might be useful, here's the log for me trying to view the same single-key profile twice:
trigger clicked 1
saving
None
{'MEMORY_1': {'MACRO_2': {'gamemode': 0, 'name': 'Menu', 'string': '-', 'type': 'key', 'value': [1, 12]}, 'MACRO_3': {'gamemode': 0, 'name': 'AltMenu', 'string': '=', 'type': 'key', 'value': [1, 13]}, 'MACRO_4': {'name': 'Alt', 'string': ';', 'type': 'key', 'value': [1, 39]}, 'MACRO_5': {'name': 'Extra', 'string': "'", 'type': 'key', 'value': [1, 40]}, 'MACRO_6': {'gamemode': 0, 'name': 'Menu', 'string': '-', 'type': 'key', 'value': [1, 12]}}}
{'mappings': {'MEMORY_1': {'MACRO_2': {'gamemode': 0, 'name': 'Menu', 'string': '-', 'type': 'key', 'value': [1, 12]}, 'MACRO_3': {'gamemode': 0, 'name': 'AltMenu', 'string': '=', 'type': 'key', 'value': [1, 13]}, 'MACRO_4': {'name': 'Alt', 'string': ';', 'type': 'key', 'value': [1, 39]}, 'MACRO_5': {'name': 'Extra', 'string': "'", 'type': 'key', 'value': [1, 40]}, 'MACRO_6': {'gamemode': 0, 'name': 'Menu', 'string': '-', 'type': 'key', 'value': [1, 12]}}}, 'openRGB': {}, 'settings': {'retryCount': 5, 'usbDeviceID': 0, 'usbTimeout': 1000}}
loading 0 1
AAAAA <lib.configtypes.Key object at 0x7f62489bd5a0> Menu
trigger clicked 0
saving
<lib.configtypes.Key object at 0x7f62489bdcc0>
{'MEMORY_1': {'MACRO_2': {'gamemode': 0, 'name': 'Menu', 'string': '-', 'type': 'key', 'value': [1, 12]}, 'MACRO_3': {'gamemode': 0, 'name': 'AltMenu', 'string': '=', 'type': 'key', 'value': [1, 13]}, 'MACRO_4': {'name': 'Alt', 'string': ';', 'type': 'key', 'value': [1, 39]}, 'MACRO_5': {'name': 'Extra', 'string': "'", 'type': 'key', 'value': [1, 40]}, 'MACRO_6': {'gamemode': 0, 'name': 'Menu', 'string': '-', 'type': 'key', 'value': [1, 12]}}}
{'name': (1, 12), 'gamemode': 0, 'type': '', 'string': 'key', 'value': '-'}
{'mappings': {'MEMORY_1': {'MACRO_2': {'name': (1, 12), 'gamemode': 0, 'type': '', 'string': 'key', 'value': '-'}, 'MACRO_3': {'gamemode': 0, 'name': 'AltMenu', 'string': '=', 'type': 'key', 'value': [1, 13]}, 'MACRO_4': {'name': 'Alt', 'string': ';', 'type': 'key', 'value': [1, 39]}, 'MACRO_5': {'name': 'Extra', 'string': "'", 'type': 'key', 'value': [1, 40]}, 'MACRO_6': {'gamemode': 0, 'name': 'Menu', 'string': '-', 'type': 'key', 'value': [1, 12]}}}, 'openRGB': {}, 'settings': {'retryCount': 5, 'usbDeviceID': 0, 'usbTimeout': 1000}}
loading 0 0
trigger clicked 1
saving
None
{'MEMORY_1': {'MACRO_2': {'name': (1, 12), 'gamemode': 0, 'type': '', 'string': 'key', 'value': '-'}, 'MACRO_3': {'gamemode': 0, 'name': 'AltMenu', 'string': '=', 'type': 'key', 'value': [1, 13]}, 'MACRO_4': {'name': 'Alt', 'string': ';', 'type': 'key', 'value': [1, 39]}, 'MACRO_5': {'name': 'Extra', 'string': "'", 'type': 'key', 'value': [1, 40]}, 'MACRO_6': {'gamemode': 0, 'name': 'Menu', 'string': '-', 'type': 'key', 'value': [1, 12]}}}
{'mappings': {'MEMORY_1': {'MACRO_2': {'name': (1, 12), 'gamemode': 0, 'type': '', 'string': 'key', 'value': '-'}, 'MACRO_3': {'gamemode': 0, 'name': 'AltMenu', 'string': '=', 'type': 'key', 'value': [1, 13]}, 'MACRO_4': {'name': 'Alt', 'string': ';', 'type': 'key', 'value': [1, 39]}, 'MACRO_5': {'name': 'Extra', 'string': "'", 'type': 'key', 'value': [1, 40]}, 'MACRO_6': {'gamemode': 0, 'name': 'Menu', 'string': '-', 'type': 'key', 'value': [1, 12]}}}, 'openRGB': {}, 'settings': {'retryCount': 5, 'usbDeviceID': 0, 'usbTimeout': 1000}}
loading 0 1
which leads to that same error after this line.
uhh that is a nasty bug, sorry about that, I will fix asap
I pushed 0.1.24, which should fix this bug.
Please remove the broken single key configs from the configuration file and regenerate it with the GUI.
Sorry for the inconvenience that was a really stupid bug. -.-
Yep, the bug is fixed.
Found the following problem: If I don't put a key combination in the GUI of the Keyboard-Center, but only a single key on the G-keys, the GUI crashes. I can restart the GUI afterwards, but if I select the profile of the G-key, on which I placed a single key before, the Keyboard-Center crashes again immediately. I can only remove the key via settings.yml and then use the keyboard center again without restrictions. All other G-Keys still work, but the single key does not. When the GUI crashes, the following error message appears when I start the keyboard center via the console: