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
Basically, it looks like in most cases a vocabulary should specify {spoken: executed}. However in the case of _vocabulary.py it's expecting {executed: spoken}. If you change vocabulary.json to try to use a different spoken command, the original key is referenced later and breaks on KeyError.
This is what I get when I change vocabulary.json to include "enable vocab <vocabulary>": "enable vocabulary <vocabulary>"
Error loading _vocabulary from C:\NatLink\NatLink\MacroSystem\_vocabulary.py
Traceback (most recent call last):
File "C:\NatLink\NatLink\MacroSystem\core\natlinkmain.py", line 340, in loadFile
imp.load_module(modName,fndFile,fndName,fndDesc)
File "C:\NatLink\NatLink\MacroSystem\_vocabulary.py", line 62, in <module>
class EnableRule(dragonfly.CompoundRule):
File "C:\NatLink\NatLink\MacroSystem\_vocabulary.py", line 63, in EnableRule
spec = command_table['enable vocabulary <vocabulary>']
KeyError: 'enable vocabulary <vocabulary>'
The text was updated successfully, but these errors were encountered:
Confirmed that this is a problem. Basically make_grammar_commands is set up to be fed into a MappingRule which is how most grammars use it, but a few of the grammars that have deeper responsibilities need more complex rules I would still like to let users redefine easily.
@djr7C4 Could you take a quick look as well? I want to ensure I'm not going too far down the rabbit hole of reimplementing the work you did on Aliases, and that I'm using them right.
I think I've fixed this here but it's really hacky:
sweetmandm@d9f3be3
Basically, it looks like in most cases a vocabulary should specify
{spoken: executed}
. However in the case of_vocabulary.py
it's expecting{executed: spoken}
. If you change vocabulary.json to try to use a different spoken command, the original key is referenced later and breaks on KeyError.This is what I get when I change vocabulary.json to include
"enable vocab <vocabulary>": "enable vocabulary <vocabulary>"
The text was updated successfully, but these errors were encountered: