mltony / nvda-phonetic-punctuation

Phonetic punctuation is an NVDA add-on that allows to convert punctuation signs into audio icons. It can also convert any regular expressions into audio icons.
GNU General Public License v2.0
12 stars 5 forks source link

speak() got multiple values for argument 'symbolLevel' #8

Open zersiax opened 3 years ago

zersiax commented 3 years ago

I tried this addon just now, and something in my config seems to be seriously messing up its day. When I enabled this addon I lost speech entirely, and I did some digging into why. Looks like a whole bunch of addons (BrailleExtender, JGT, Tony's Enhancements, NVDARemote) don't really appreciate something the addon's doing with the punctuation level. I've included a snip of my logs below to show off what i mean. JGT isn't here because I disabled it, thinking it was the only culprit at first, but yeah ...look at this: NVDA initialized INFO - external:globalPlugins.remoteClient.GlobalPlugin.on_connected_as_slave (13:19:35.754) - MainThread (24484): Control connector connected ERROR - unhandled exception (13:19:35.776) - MainThread (24484): Traceback (most recent call last): File "wx\core.pyc", line 3407, in File "C:\Users\flori\AppData\Roaming\nvda\addons\remote\globalPlugins\remoteClient__init.py", line 388, in on_connected_asslave speech.speakMessage(("Connected to control server")) File "speech\speech.pyc", line 181, in speakMessage File "C:\Users\flori\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\speechmode.py", line 50, in speak orig_speak(speechSequence, symbolLevel, priority) File "C:\Users\flori\AppData\Roaming\nvda\addons\phoneticPunctuation\globalPlugins\phoneticPunctuation.py", line 1235, in preSpeak return originalSpeechSpeak(newSequence, symbolLevel=symbolLevel, *args, kwargs) File "C:\Users\flori\AppData\Roaming\nvda\addons\tonysEnhancements\globalPlugins\tonysEnhancements.py", line 866, in newSpeechSpeak return originalSpeechSpeak(sequence, *args, *kwargs) TypeError: speak() got multiple values for argument 'symbolLevel' WARNING - eventHandler._EventExecuter.next (13:19:36.012) - MainThread (24484): Could not execute function event_focusEntered defined in NVDAObjects module; kwargs: {} Traceback (most recent call last): File "eventHandler.pyc", line 105, in next File "NVDAObjects__init__.pyc", line 1131, in event_focusEntered File "speech\speech.pyc", line 541, in speakObject File "C:\Users\flori\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\speechmode.py", line 50, in speak orig_speak(speechSequence, symbolLevel, priority) File "C:\Users\flori\AppData\Roaming\nvda\addons\phoneticPunctuation\globalPlugins\phoneticPunctuation.py", line 1235, in preSpeak return originalSpeechSpeak(newSequence, symbolLevel=symbolLevel, args, kwargs) File "C:\Users\flori\AppData\Roaming\nvda\addons\tonysEnhancements\globalPlugins\tonysEnhancements.py", line 866, in newSpeechSpeak return originalSpeechSpeak(sequence, *args, **kwargs) TypeError: speak() got multiple values for argument 'symbolLevel' ERROR - eventHandler.executeEvent (13:19:36.013) - MainThread (24484): error executing event: focusEntered on <NVDAObjects.Dynamic_ClipboardCommandAnnouncementNvdaDialogDialogIAccessibleWindowNVDAObject object at 0x0FD82E70> with extra args of {} Traceback (most recent call last): File "eventHandler.pyc", line 105, in next File "NVDAObjects\init__.pyc", line 1131, in event_focusEntered File "speech\speech.pyc", line 541, in speakObject File "C:\Users\flori\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\speechmode.py", line 50, in speak orig_speak(speechSequence, symbolLevel, priority) File "C:\Users\flori\AppData\Roaming\nvda\addons\phoneticPunctuation\globalPlugins\phoneticPunctuation.py", line 1235, in preSpeak return originalSpeechSpeak(newSequence, symbolLevel=symbolLevel, *args, *kwargs) File "C:\Users\flori\AppData\Roaming\nvda\addons\tonysEnhancements\globalPlugins\tonysEnhancements.py", line 866, in newSpeechSpeak return originalSpeechSpeak(sequence, args, **kwargs) TypeError: speak() got multiple values for argument 'symbolLevel'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "eventHandler.pyc", line 246, in executeEvent File "eventHandler.pyc", line 96, in init File "eventHandler.pyc", line 112, in next File "extensionPoints\util.pyc", line 170, in callWithSupportedKwargs File "NVDAObjects__init__.pyc", line 1131, in event_focusEntered File "speech\speech.pyc", line 541, in speakObject File "C:\Users\flori\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\speechmode.py", line 50, in speak orig_speak(speechSequence, symbolLevel, priority) File "C:\Users\flori\AppData\Roaming\nvda\addons\phoneticPunctuation\globalPlugins\phoneticPunctuation.py", line 1235, in preSpeak return originalSpeechSpeak(newSequence, symbolLevel=symbolLevel, *args, *kwargs) File "C:\Users\flori\AppData\Roaming\nvda\addons\tonysEnhancements\globalPlugins\tonysEnhancements.py", line 866, in newSpeechSpeak return originalSpeechSpeak(sequence, args, **kwargs) TypeError: speak() got multiple values for argument 'symbolLevel' WARNING - eventHandler._EventExecuter.next (13:19:36.017) - MainThread (24484):

mltony commented 3 years ago

There are many add-ons that override speech.speak function and because they override it in different ways they often conflict with each other. Here from the logs I see that they seem to don't like braille extender.

Not sure on which side the problem is. But I received a few reports like this before, so I will try to find some time to dig deeper into this problem and improve compatibility if the problem is in my add-ons.

On 8/29/2021 4:30 AM, Florian Beijers wrote:

I tried this addon just now, and something in my config seems to be seriously messing up its day. When I enabled this addon I lost speech entirely, and I did some digging into why. Looks like a whole bunch of addons (BrailleExtender, JGT, Tony's Enhancements, NVDARemote) don't really appreciate something the addon's doing with the punctuation level. I've included a snip of my logs below to show off what i mean. JGT isn't here because I disabled it, thinking it was the only culprit at first, but yeah ...look at this: NVDA initialized INFO - external:globalPlugins.remoteClient.GlobalPlugin.on_connected_asslave (13:19:35.754) - MainThread (24484): Control connector connected ERROR - unhandled exception (13:19:35.776) - MainThread (24484): Traceback (most recent call last): File "wx\core.pyc", line 3407, in File "C:\Users\flori\AppData\Roaming\nvda\addons\remote\globalPlugins\remoteClient/init/_.py", line 388, in on_connected_asslave speech.speakMessage(("Connected to control server")) File "speech\speech.pyc", line 181, in speakMessage File "C:\Users\flori\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\speechmode.py", line 50, in speak orig_speak(speechSequence, symbolLevel, priority) File "C:\Users\flori\AppData\Roaming\nvda\addons\phoneticPunctuation\globalPlugins\phoneticPunctuation.py", line 1235, in preSpeak return originalSpeechSpeak(newSequence, symbolLevel=symbolLevel, *args, kwargs) File "C:\Users\flori\AppData\Roaming\nvda\addons\tonysEnhancements\globalPlugins\tonysEnhancements.py", line 866, in newSpeechSpeak return originalSpeechSpeak(sequence, *args, *kwargs) TypeError: speak() got multiple values for argument 'symbolLevel' WARNING - eventHandler./EventExecuter.next (13:19:36.012) - MainThread (24484): Could not execute function eventfocusEntered defined in NVDAObjects module; kwargs: {} Traceback (most recent call last): File "eventHandler.pyc", line 105, in next File "NVDAObjects/init//.pyc", line 1131, in event_focusEntered File "speech\speech.pyc", line 541, in speakObject File "C:\Users\flori\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\speechmode.py", line 50, in speak orig_speak(speechSequence, symbolLevel, priority) File "C:\Users\flori\AppData\Roaming\nvda\addons\phoneticPunctuation\globalPlugins\phoneticPunctuation.py", line 1235, in preSpeak return originalSpeechSpeak(newSequence, symbolLevel=symbolLevel, args, kwargs) File "C:\Users\flori\AppData\Roaming\nvda\addons\tonysEnhancements\globalPlugins\tonysEnhancements.py", line 866, in newSpeechSpeak return originalSpeechSpeak(sequence, *args, kwargs) TypeError: speak() got multiple values for argument 'symbolLevel' ERROR - eventHandler.executeEvent (13:19:36.013) - MainThread (24484): error executing event: focusEntered on <NVDAObjects.DynamicClipboardCommandAnnouncementNvdaDialogDialogIAccessibleWindowNVDAObject object at 0x0FD82E70> with extra args of {} Traceback (most recent call last): File "eventHandler.pyc", line 105, in next File "NVDAObjects/init/_.pyc", line 1131, in event_focusEntered File "speech\speech.pyc", line 541, in speakObject File "C:\Users\flori\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\speechmode.py", line 50, in speak orig_speak(speechSequence, symbolLevel, priority) File "C:\Users\flori\AppData\Roaming\nvda\addons\phoneticPunctuation\globalPlugins\phoneticPunctuation.py", line 1235, in preSpeak return originalSpeechSpeak(newSequence, symbolLevel=symbolLevel, *args, *kwargs) File "C:\Users\flori\AppData\Roaming\nvda\addons\tonysEnhancements\globalPlugins\tonysEnhancements.py", line 866, in newSpeechSpeak return originalSpeechSpeak(sequence, args, kwargs) TypeError: speak() got multiple values for argument 'symbolLevel'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "eventHandler.pyc", line 246, in executeEvent File "eventHandler.pyc", line 96, in init File "eventHandler.pyc", line 112, in next File "extensionPoints\util.pyc", line 170, in callWithSupportedKwargs File "NVDAObjects/init/.pyc", line 1131, in event_focusEntered File "speech\speech.pyc", line 541, in speakObject File "C:\Users\flori\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\speechmode.py", line 50, in speak orig_speak(speechSequence, symbolLevel, priority) File "C:\Users\flori\AppData\Roaming\nvda\addons\phoneticPunctuation\globalPlugins\phoneticPunctuation.py", line 1235, in preSpeak return originalSpeechSpeak(newSequence, symbolLevel=symbolLevel, *args, *kwargs) File "C:\Users\flori\AppData\Roaming\nvda\addons\tonysEnhancements\globalPlugins\tonysEnhancements.py", line 866, in newSpeechSpeak return originalSpeechSpeak(sequence, args, **kwargs) TypeError: speak() got multiple values for argument 'symbolLevel' WARNING - eventHandler._EventExecuter.next (13:19:36.017) - MainThread (24484):

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mltony/nvda-phonetic-punctuation/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIJRDHBTSDAHY3K3EXHALFTT7IK7DANCNFSM5DAEUNJA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

zersiax commented 3 years ago

Yes, brailleExtender appears to be the offender in this case. It's hard to really pin this anywhere given the way NVDA handles this kind of thing, I guess this is another addon to add to the list of perhaps incompatible until a solution is found on either end