AAClause / BrailleExtender

NVDA add-on that improves braille support
https://andreabc.net/projects/NVDA_addons/BrailleExtender/
GNU General Public License v2.0
16 stars 17 forks source link

Last BrailleExtender (developing version) for NVDA completely breaks braille output #108

Closed Futyn-Maker closed 3 years ago

Futyn-Maker commented 3 years ago

Hello!

I've updated BrailleExtender to 21.10.25:3bad14a and noticed that braille output has been completely broken. My display (Mantis Q40) shows nothing. The log says following:

Traceback (most recent call last):
  File "eventHandler.pyc", line 246, in executeEvent
  File "eventHandler.pyc", line 96, in __init__
  File "eventHandler.pyc", line 105, in next
  File "C:\Users\Fylhtq\AppData\Roaming\nvda\addons\remote\globalPlugins\remoteClient\__init__.py", line 458, in event_gainFocus
    nextHandler()
  File "eventHandler.pyc", line 105, in next
  File "C:\Users\Fylhtq\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\__init__.py", line 186, in event_gainFocus
    nextHandler()
  File "eventHandler.pyc", line 105, in next
  File "C:\Users\Fylhtq\AppData\Roaming\nvda\addons\objsounds\globalPlugins\objsounds\__init__.py", line 48, in event_gainFocus
    nextHandler()
  File "eventHandler.pyc", line 105, in next
  File "appModules\explorer.pyc", line 415, in event_gainFocus
  File "eventHandler.pyc", line 105, in next
  File "NVDAObjects\__init__.pyc", line 1128, in event_gainFocus
  File "braille.pyc", line 1911, in handleGainFocus
  File "braille.pyc", line 1916, in _doNewObject
  File "braille.pyc", line 1547, in getFocusContextRegions
  File "C:\Users\Fylhtq\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\objectpresentation.py", line 113, in update_NVDAObjectRegion
    cellInfo=cellInfo
  File "C:\Users\Fylhtq\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\objectpresentation.py", line 220, in getPropertiesBraille
    roleText = roleLabels.get(role, role.displayString)
AttributeError: 'int' object has no attribute 'displayString'

Have you any ideas what's the problem?

Thanks

AAClause commented 3 years ago

Thank you for this report. Due to PR #107 I'm assuming you're using NVDA 2021.1 or earlier, is right? Sorry, I tested with 2021.2 and the latest alpha only. Please test with the new build and let me know if there are any problems. :)

Futyn-Maker commented 3 years ago

@aaclause Thanks for reply. Still doesn't work with NVDA 2020.4 (I use this because of some addons that are important for me aren't still updated).

Traceback (most recent call last):
  File "eventHandler.pyc", line 246, in executeEvent
  File "eventHandler.pyc", line 96, in __init__
  File "eventHandler.pyc", line 105, in next
  File "C:\Users\Fylhtq\AppData\Roaming\nvda\addons\remote\globalPlugins\remoteClient\__init__.py", line 458, in event_gainFocus
    nextHandler()
  File "eventHandler.pyc", line 105, in next
  File "C:\Users\Fylhtq\AppData\Roaming\nvda\addons\objsounds\globalPlugins\objsounds\__init__.py", line 48, in event_gainFocus
    nextHandler()
  File "eventHandler.pyc", line 105, in next
  File "C:\Users\Fylhtq\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\__init__.py", line 186, in event_gainFocus
    nextHandler()
  File "eventHandler.pyc", line 105, in next
  File "appModules\nvda.pyc", line 86, in event_gainFocus
  File "eventHandler.pyc", line 105, in next
  File "NVDAObjects\IAccessible\__init__.pyc", line 1869, in event_gainFocus
  File "NVDAObjects\__init__.pyc", line 1128, in event_gainFocus
  File "braille.pyc", line 1911, in handleGainFocus
  File "braille.pyc", line 1916, in _doNewObject
  File "braille.pyc", line 1547, in getFocusContextRegions
  File "C:\Users\Fylhtq\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\objectpresentation.py", line 113, in update_NVDAObjectRegion
    cellInfo=cellInfo
  File "C:\Users\Fylhtq\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\objectpresentation.py", line 305, in getPropertiesBraille
    properties["current"] = is_current_display_string(isCurrent)
  File "C:\Users\Fylhtq\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\objectpresentation.py", line 155, in is_current_display_string
    if hasattr(get_control_type("controlTypes"), "isCurrentLabels"):
  File "C:\Users\Fylhtq\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender\utils.py", line 374, in get_control_type
    return getattr(controlTypes, control_type)
AttributeError: module 'controlTypes' has no attribute 'controlTypes'

If it's impossible to make compatebility with NVDA older than 2021.1, I/m sorry and I'm ready to close this PR. I just thought changes in 2021.1 don't break back compatebility.

AAClause commented 3 years ago

Thanks! It should be better now. I had introduced an error on a line...

Futyn-Maker commented 3 years ago

Many thanks, now works fine!