NSoiffer / MathCATForPython

A Python Interface and NVDA plugin to MathCAT
MIT License
7 stars 7 forks source link

Error when navigating Math expression #60

Closed bhavyashah closed 1 week ago

bhavyashah commented 1 year ago

STR 1 Open the attached HTML file in Microsoft Edge. 2 Navigate to the Math expression "clickable the limit as x o a of c is equal to c." 3 Press NVDA+Alt+m. NVDA says "the limit as x o a." 4 Press right arrow or down arrow. Expected Result: NVDA reports the RHS of the equality or zooms into the limit respectively. Actual Result: NVDA is quiet with the following error logged. IO - inputCore.executeGesture (12:59:48.316) - winInputHook (484): Input: kb(laptop):downArrow ERROR - scriptHandler.executeScript (12:59:48.324) - MainThread (1392): error executing script: <bound method MathCATInteraction.script_navigate of <globalPlugins.MathCAT.MathCAT.MathCATInteraction object at 0x0119F890>> with gesture 'down arrow' Traceback (most recent call last): File "scriptHandler.pyc", line 295, in executeScript File "C:\Users\bhavy\AppData\Roaming\nvda\addons\MathCAT\globalPlugins\MathCAT\MathCAT.py", line 234, in script_navigate "shift" in modNames, "control" in modNames, "alt" in modNames, False) pyo3_runtime.PanicException: called Option::unwrap() on a None value common_limits_with_mathjax.html.txt

bhavyashah commented 1 year ago

Came across another test case which logs the same error. """

lim n P ( | S n E [ S n ] | ϵ E [ S n ] )

""" Press NVDA+Alt+m, and press down arrow twice, or alternatively, down arrow followed by right arrow. This happened with quite a few other expressions in a Math document I was reviewing earlier today. My guess is that the important error line is "pyo3_runtime.PanicException: called Option::unwrap() on a None value."

NSoiffer commented 1 week ago

I believe I fixed this a while back -- I can't replicate it.

I'm about to put out a new MathCAT (probably v0.6.5), but you can try out a beta version on my google drive. If you can test with that, I'd appreciate it.

Please reopen the issue if there is still a bug. If the bug still exists, please send me the contents of %APPDATA\MathCAT\prefs.yaml. If that doesn't exist (which means you never changed a preference), let me know.