You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DictFeatWidget fails to initialize when keys are not explicitly set #64
Context: I ran start_test_app on an instance of a custom driver which contained DictFeats initialized without specifying a keys=() argument. The following error shows up:
Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\lantz\ui\widgets.py", line 528, in __init__
feat_widget = LabeledFeatWidget(self, target, feat)
File "C:\Anaconda3\lib\site-packages\lantz\ui\widgets.py", line 415, in __init__
self._widget = DictFeatWidget(parent, target, feat)
File "C:\Anaconda3\lib\site-packages\lantz\ui\widgets.py", line 340, in __init__
wid.feat_key = self._keys[0]
AttributeError: 'DictFeatWidget' object has no attribute '_keys'
Probable origin: In that case, keys default to None so when the DictFeatWidget is created by start_test_app the _keys attribute is not set within the if feat.keys statement before wid.feat_key = self._keys[0] is run, leading to the error.
Probable fix: wid.feat_key = self._keys[0] should only be run when keys exist.
Activity