Skip to content
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

Braille Display Locks up After Switching to Japanese 6 Dot Computer Braille #122

Open
dangero2000 opened this issue May 19, 2023 · 4 comments

Comments

@dangero2000
Copy link

dangero2000 commented May 19, 2023

If I go to the NVDA settings and change my braille input/output to Japanese 6 dot Computer braille, the last text reported by the display will not change, and I have to switch back to seemingly any other output table or disable the addon entirely to continue using braille. This issue is not present if I use Kantenji.

After testing Braille Extender with NVDA alpha-28231,648a5d34 (2023.2.0.28231), I have determined that this issue is specific to NVDA JP. Regular versions of NVDA only list Japanese Kantanji as a viable output table, and you cannot input in Japanese at all. The computer braille table only seems to exist in NVDA JP.

Here is the traceback:

Traceback (most recent call last):
File "eventHandler.pyc", line 300, in executeEvent
File "eventHandler.pyc", line 101, in init
File "eventHandler.pyc", line 110, in next
File "D:\NVDAJP\userConfig\addons\BrailleExtender\globalPlugins\brailleExtender_init_.py", line 223, in event_gainFocus
if self.backup__brailleTableDict != config.conf["braille"]["translationTable"]: self.reloadBrailleTables()
File "D:\NVDAJP\userConfig\addons\BrailleExtender\globalPlugins\brailleExtender_init_.py", line 285, in reloadBrailleTables
undefinedchars.setUndefinedChar()
File "D:\NVDAJP\userConfig\addons\BrailleExtender\globalPlugins\brailleExtender\undefinedchars.py", line 81, in setUndefinedChar
f"undefined {HUCDotPattern}", "ASCII"))
File "louis_init_.pyc", line 488, in compileString
RuntimeError: Can't compile entry: tables ['D:\NVDAJP\louis\tables\ja-jp-comp6.utb', 'D:\NVDAJP\louis\tables\braille-patterns.cti'], inString b'undefined 12345678-78-12345678'
ERROR - eventHandler.executeEvent (21:46:18.944) - MainThread (4592):
error executing event: gainFocus on <NVDAObjects.Dynamic_UIItemListItemUIA object at 0x064C13F0> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 300, in executeEvent
File "eventHandler.pyc", line 101, in init
File "eventHandler.pyc", line 110, in next
File "D:\NVDAJP\userConfig\addons\BrailleExtender\globalPlugins\brailleExtender_init_.py", line 224, in event_gainFocus
nextHandler()
File "eventHandler.pyc", line 110, in next
File "appModules\explorer.pyc", line 506, in event_gainFocus
File "eventHandler.pyc", line 110, in next
File "NVDAObjects\UIA_init_.pyc", line 1341, in event_gainFocus
File "NVDAObjects_init_.pyc", line 1283, in event_gainFocus
File "braille.pyc", line 2486, in handleGainFocus
File "braille.pyc", line 2491, in doNewObject
File "braille.pyc", line 1949, in getFocusContextRegions
File "braille.pyc", line 878, in update
File "D:\NVDAJP\userConfig\addons\BrailleExtender\globalPlugins\brailleExtender\patches.py", line 164, in update
undefinedchars.undefinedCharProcess(self)
File "D:\NVDAJP\userConfig\addons\BrailleExtender\globalPlugins\brailleExtender\undefinedchars.py", line 204, in undefinedCharProcess
startTag = getTextInBraille(startTag)
File "D:\NVDAJP\userConfig\addons\BrailleExtender\globalPlugins\brailleExtender\utils.py", line 161, in getTextInBraille
res = [louis.translateString(table, l, mode=louis.ucBrl|louis.dotsIO) for l in t if l]
File "D:\NVDAJP\userConfig\addons\BrailleExtender\globalPlugins\brailleExtender\utils.py", line 161, in
res = [louis.translateString(table, l, mode=louis.ucBrl|louis.dotsIO) for l in t if l]
File "louis_init
.pyc", line 317, in translateString
RuntimeError: Can't translate: tables ['D:\NVDAJP\louis\tables\ja-jp-comp6.utb', 'D:\NVDAJP\louis\tables\braille-patterns.cti'], inbuf b'[\x00\x00\x00', typeform None, mode 68
ERROR - eventHandler.executeEvent (21:46:19.752) - MainThread (4592):
error executing event: gainFocus on <NVDAObjects.Dynamic_MultitaskingViewFrameListItemListItemUIA object at 0x08317870> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 300, in executeEvent
File "eventHandler.pyc", line 101, in init
File "eventHandler.pyc", line 110, in next
File "D:\NVDAJP\userConfig\addons\BrailleExtender\globalPlugins\brailleExtender_init_.py", line 224, in event_gainFocus
nextHandler()
File "eventHandler.pyc", line 110, in next
File "appModules\explorer.pyc", line 506, in event_gainFocus
File "eventHandler.pyc", line 110, in next
File "NVDAObjects\UIA_init_.pyc", line 1341, in event_gainFocus
File "NVDAObjects_init_.pyc", line 1283, in event_gainFocus
File "braille.pyc", line 2486, in handleGainFocus
File "braille.pyc", line 2491, in doNewObject
File "braille.pyc", line 1985, in getFocusRegions
File "braille.pyc", line 878, in update
File "D:\NVDAJP\userConfig\addons\BrailleExtender\globalPlugins\brailleExtender\patches.py", line 164, in update
undefinedchars.undefinedCharProcess(self)
File "D:\NVDAJP\userConfig\addons\BrailleExtender\globalPlugins\brailleExtender\undefinedchars.py", line 204, in undefinedCharProcess
startTag = getTextInBraille(startTag)
File "D:\NVDAJP\userConfig\addons\BrailleExtender\globalPlugins\brailleExtender\utils.py", line 161, in getTextInBraille
res = [louis.translateString(table, l, mode=louis.ucBrl|louis.dotsIO) for l in t if l]
File "D:\NVDAJP\userConfig\addons\BrailleExtender\globalPlugins\brailleExtender\utils.py", line 161, in
res = [louis.translateString(table, l, mode=louis.ucBrl|louis.dotsIO) for l in t if l]
File "louis_init
.pyc", line 317, in translateString
RuntimeError: Can't translate: tables ['D:\NVDAJP\louis\tables\ja-jp-comp6.utb', 'D:\NVDAJP\louis\tables\braille-patterns.cti'], inbuf b'[\x00\x00\x00', typeform None, mode 68
ERROR - eventHandler.executeEvent (21:46:20.463) - MainThread (4592):
error executing event: gainFocus on <NVDAObjects.Dynamic_MultitaskingViewFrameListItemListItemUIA object at 0x03CAB0F0> with extra args of {}

@aaclause
Copy link
Owner

Thanks for the report. Can you test the issue with the latest dev build of the add-on?
You can get it at https://www.nvaccess.org/addonStore/legacy?file=brlext-dev.

@dangero2000
Copy link
Author

Thanks for the link. I just tested the dev build, and unfortunately, the issue still persists. Do you want me to send my entire log to make it easier to trace?

@aaclause
Copy link
Owner

aaclause commented May 21, 2023

I was able to reproduce the issue. There is a temporary solution for this. You can prevent this bug by disabling the Undefined Character Representation feature, by following these steps:

  1. Go to the Braille Extender submenu.
  2. Select 'Settings'.
  3. Navigate to the 'Undefined Character Representation' section.
  4. In the first listbox (labelled 'Representation Method'), select the 'Use Braille Table Behavior (No Description Possible)' choice.
  5. Once this is done, you should be able to select the Japanese 6 Dot Computer Braille as the output braille table without experiencing the error.

I'll try to fix it ASAP. Thank you again for the report.

@dangero2000
Copy link
Author

Once this is done, you should be able to select the Japanese 6 Dot Computer Braille as the output braille table without experiencing the error.

It works! :-) Thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants