-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A KeyError is thrown in NVDA 2023.1 #10
Comments
This actually turned out to be a one-line fix. Going to PR, but before I do, I have a quick question on how this works. Currently, I'm checking if the value is greater than or equal to 2, because 3 is both speech and tones. Is this correct behavior? Was the old boolean also set if both speech and tones was selected? |
I think my code just checks whether report indentation with tones is True.
Also for the PR, could you figure out and use enum values in new NVDA
version? Most likely they have enum with values 0,1,2,3 - and I'd rather
reference that enum than just use magic constants.
…On 11/28/2022 8:05 AM, Quin wrote:
This actually turned out to be a one-line fix. Going to PR, but before
I do, I have a quick question on how this works. Currently, I'm
checking if the value is greater than or equal to 2, because 3 is both
speech and tones. Is this correct behavior? Was the old boolean also
set if both speech and tones was selected?
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJRDHGPV3L2JUS6SERM3M3WKTJ23ANCNFSM6AAAAAASNPZUEM>.
You are receiving this because you are subscribed to this
thread.Message ID:
***@***.***>
|
Hi, |
Aha, found it. Its config.configFlags.ReportLineIndentation. Will make my code use it later today. Am still curious about that speech and tones question, though. |
I believe when indentation reporting is set to speech+tones, the
behavior of indentNav will be the same as only tones.
…On 11/28/2022 11:09 AM, Quin wrote:
Hi,
Yeah, I certainly can. I'm not sure where, if anywhere, that would be,
but I'll do some digging.
My question about the speech and tones question is basically this: If
you set your line indentation reporting to both speech and tones, is
that boolean still true? I don't have an old version of NVDA anymore,
so I can't really check.
Thanks.
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJRDHCOZMHDYHIBOGEZZOLWKT7N5ANCNFSM6AAAAAASNPZUEM>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Alright, thanks. Will probably have the PR up by tomorrow |
Use new configuration values for telling if indentation reporting is turned on. Closes #10.
Currently, on NVDA snapshots (later 2023.1), the following is written to the log every time I try to use an indent nav command:
ERROR - scriptHandler.executeScript (08:54:47.188) - MainThread (38888):
error executing script: <bound method EditableIndentNav.script_moveToParent of <NVDAObjects.Dynamic_EditWindowScintillaIAccessibleScintillaWindowNVDAObjectEditableIndentNav object at 0x0912AED0>> with gesture 'alt+NVDA+left arrow'
Traceback (most recent call last):
File "scriptHandler.pyc", line 289, in executeScript
File "C:\Users\Owner\AppData\Roaming\nvda\addons\IndentNav\globalPlugins\indent_nav.py", line 548, in script_moveToParent
self.move(-1, [msgEditable], unbounded=True, op=operator.lt)
File "C:\Users\Owner\AppData\Roaming\nvda\addons\IndentNav\globalPlugins\indent_nav.py", line 485, in move
self.moveInEditable(increment, errorMessages[0], unbounded, op, speakOnly=speakOnly, moveCount=moveCount)
File "C:\Users\Owner\AppData\Roaming\nvda\addons\IndentNav\globalPlugins\indent_nav.py", line 527, in moveInEditable
self.crackle(indentLevels)
File "C:\Users\Owner\AppData\Roaming\nvda\addons\IndentNav\globalPlugins\indent_nav.py", line 418, in crackle
if self.isReportIndentWithTones():
File "C:\Users\Owner\AppData\Roaming\nvda\addons\IndentNav\globalPlugins\indent_nav.py", line 415, in isReportIndentWithTones
return config.conf["documentFormatting"]["reportLineIndentationWithTones"]
File "config_init_.pyc", line 1058, in getitem
KeyError: 'reportLineIndentationWithTones'
This is most likely due to the following entry in the changelog:
• The configuration specification has been altered, keys have been removed or modified (#14233).
◦ In [documentFormatting] section:
▪ reportLineIndentation stores an int value (0 to 3) instead of a boolean
▪ reportLineIndentationWithTones has been removed.
I'm not sure what value tones has in that range of integers, but perhaps its documented somewhere? In any case I imagine this is probably a pretty simple fix. Going to give it a look when I have time, but if you have any other ideas or are able to fix it faster, that would be great too! :)
The text was updated successfully, but these errors were encountered: