Yin-Yang
Yin-Yang copied to clipboard
crashes with older preferences file
I installed this months ago, and wanted to try it out again. It crashes when clicking the settings-button:
Traceback (most recent call last):
File "/opt/yin-yang/src/gui.py", line 331, in open_settings
self.secwindow = SettingsWindow()
File "/opt/yin-yang/src/gui.py", line 23, in __init__
self.sync_with_config()
File "/opt/yin-yang/src/gui.py", line 108, in sync_with_config
self.ui.kvantum_line_light.setText(config.get("kvantumLightTheme"))
File "/opt/yin-yang/src/config.py", line 195, in get
return config[key]
KeyError: 'kvantumLightTheme'
Also, clicking the dark/light buttons triggers:
Exception in thread Thread-25:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/opt/yin-yang/src/yin_yang.py", line 53, in run
if config.get("gnomeEnabled"):
File "/opt/yin-yang/src/config.py", line 195, in get
return config[key]
KeyError: 'gnomeEnabled'
(note the thread count too, with each click it increased)
Starting with a fresh settings file helped. That is my old one: https://pastebin.com/5HfV9Ua0
Btw, I cannot terminate the program from the terminal I started it using CTRL + C / SIGINT.
Hey, thanks for raising this I was not aware! I recently merged a pr that was adding new flags for the config. Indeed the CTRL-C did not work to quit the program, you will need to use the gui. For now the fix is to just reinstall the tool.
Is this due to the keys 'gnomeEnabled' and 'kvantumLightTheme' not being present in older versions? Perhaps instead of a versioning system we should attempt to read all of the known settings and default any ones which don't exist.
We now have methods for updating the config, this should not happen anymore