Duplicate dictionary AssertionError has no clear user facing message
Opened this issue · 0 comments
didoesdigital commented
Describe the bug
When the plover.cfg
file contains duplicate dictionaries in the dictionaries
array, Plover shows…
Qt GUI error
,AssertionError
- Default dictionaries as "loading", even if those files aren't there
- No sign of active custom dictionaries, even though some are working
To Reproduce
Steps to reproduce the behavior:
- Add duplicate dictionaries to
plover.cfg
e.g.:
dictionaries = [{"enabled": true, "path": "~/dictionaries/css-alignment.json"}, {"enabled": true, "path": "~/dictionaries/css-alignment.json"}]
- Open Plover
- See error
plover.log
file shows:
2021-12-29 20:55:23,350 [MainThread] ERROR: Qt GUI error
Traceback (most recent call last):
File "/Users/runner/work/plover/plover/build/osxapp/Plover.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.9/site-packages/plover/gui_qt/dictionaries_widget.py", line 225, in _on_config_changed
File "/Users/runner/work/plover/plover/build/osxapp/Plover.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.9/site-packages/plover/gui_qt/dictionaries_widget.py", line 188, in _reset_items
AssertionError
Here's a link to the error code: https://github.com/openstenoproject/plover/blob/master/plover/gui_qt/dictionaries_widget.py#L188
Expected behavior
A more user-friendly error message, such as "Duplicate dictionaries. Check plover.cfg for duplicate dictionaries."
Operating system
- OS: macOS Catalina
- Plover 4.0.0.dev10+120.g4394ef1
Hardware
N/A