Skip to content

Fixes 'Choose N' rule hijacks Dragon's Choose command - #69

Merged
quintijn merged 5 commits into
dictation-toolbox:masterfrom
dougransom:ca_unimacro_april26
Jul 23, 2026
Merged

quintijn merged 5 commits into
dictation-toolbox:masterfrom
dougransom:ca_unimacro_april26

Conversation

@dw96

@dw96 dw96 commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Dragon's built-in Choose N becomes available when there are multiple choices, such as which programme to choose after saying "List Programs". _general defines a conflicting Choose N rule (where N = 1-10). This PR addresses the above conflict by renaming _general's 'choose' rule to be 'pick'.

Separately, I discover that there is a wider problem with this rule. It produces an Exception when triggered. I will need to revisit this PR to debug this:

got pick: ['pick', 'one'] -> 1
action: not found, meta action for pick 1: |None|, searched in sectionList: ['default']
Traceback (most recent call last):
  File "C:\Users\solil\AppData\Roaming\Python\Python310-32\site-packages\unimacro\natlinkutilsbj.py", line 888, in resultsCallback
    self.__inherited.resultsCallback(self, wordsAndNums, resObj)
  File "C:\Users\solil\AppData\Roaming\Python\Python310-32\site-packages\unimacro\natlinkutilsbj.py", line 492, in resultsCallback
    self.__inherited.resultsCallback(self, wordsAndNums, resObj)
  File "C:\Users\solil\AppData\Roaming\Python\Python310-32\site-packages\natlinkcore\natlinkutils.py", line 1017, in resultsCallback
    self.callRuleResultsFunctions(seqsAndRules, fullResults)
  File "C:\Users\solil\AppData\Roaming\Python\Python310-32\site-packages\natlinkcore\natlinkutils.py", line 1042, in callRuleResultsFunctions
    self.callIfExists( 'gotResults_'+ruleName, (ruleWords, fullResults) )
  File "C:\Users\solil\AppData\Roaming\Python\Python310-32\site-packages\natlinkcore\natlinkutils.py", line 395, in callIfExists
    return func(*argList)
  File "C:\Users\solil\AppData\Roaming\Python\Python310-32\site-packages\unimacro\unimacrogrammars\_general.py", line 590, in gotResults_pick
    action(f'<<pick {n}>>')
  File "C:\Users\solil\AppData\Roaming\Python\Python310-32\site-packages\dtactions\unimacroactions.py", line 256, in doAction
    result = doAction(a, completeAction=completeAction,
  File "C:\Users\solil\AppData\Roaming\Python\Python310-32\site-packages\dtactions\unimacroactions.py", line 309, in doAction
    raise ActionError(t)
dtactions.unimacroactions.ActionError: _actions, no valid meta action: "<<pick 1>>"

    _general.py:  Renames 'choose' rule to be 'pick'.
@dw96
dw96 marked this pull request as ready for review April 21, 2026 11:18
@dw96
dw96 marked this pull request as draft April 21, 2026 11:20
@dw96
dw96 marked this pull request as ready for review April 21, 2026 11:20
@quintijn

Copy link
Copy Markdown
Collaborator

Christian, let us discuss this one first! A bit busy these days, maybe Friday will fit...

@dw96 dw96 self-assigned this Apr 22, 2026
@dw96 dw96 added the bug Something isn't working label Apr 22, 2026
@dw96

dw96 commented Apr 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Sorry this should be commit 398b8f5 (the first). Didn't expect the second commit to turn up here - and credited to a random user!
I have fixed the commit attributed to a random user (but it was actually mine), by reverting the branch back to the previous commit, i.e.: 398b8f5.

@dw96
dw96 force-pushed the ca_unimacro_april26 branch 2 times, most recently from ba639f7 to 398b8f5 Compare May 7, 2026 10:16
@dw96
dw96 force-pushed the ca_unimacro_april26 branch from d2f76ba to 398b8f5 Compare May 14, 2026 14:10
@dw96
dw96 force-pushed the ca_unimacro_april26 branch from 148aa30 to c6cffc5 Compare July 22, 2026 15:58
@quintijn
quintijn merged commit 8c82f7e into dictation-toolbox:master Jul 23, 2026
1 check passed
@dw96
dw96 deleted the ca_unimacro_april26 branch July 24, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants