Skip to content

comInterfaces_sconscript: correct case of MathPlayer.py string.#12310

Merged
michaelDCurran merged 1 commit into
masterfrom
i12281
Apr 20, 2021
Merged

comInterfaces_sconscript: correct case of MathPlayer.py string.#12310
michaelDCurran merged 1 commit into
masterfrom
i12281

Conversation

@michaelDCurran

@michaelDCurran michaelDCurran commented Apr 20, 2021

Copy link
Copy Markdown
Member

Link to issue number:

Fixes #12281

Summary of the issue:

Math can no longer be read in NVDA with mathPlayer.
a regression introduced by pr #12201
comInterfaces_sconscript instructs comtypes to generate Python files from typelibs/mathPlayer.tlb. Comtypes produces MathPlayer.py (note the uppercase M). However, the sconscript target was hardcoded as "mathPlayer.py" (note the lowercase m). This has always been the case, and has not been a problem as scons and Windows is case insensitive and so Scons thought the target had been correctly created. However, pr #12201 makes use of the target's abspath property to rewrite the file with some extra imports. However, the path is made from the hardcoded target, so it has the lowercase m and therefore when the file is written out again, it has a lowercase m, and mathPres cannot then import MathPlayer with an uppercase M.

Description of how this pull request fixes the issue:

Correct the "mathPlayer.py" string in comInterfaces_sconscript to "MathPlayer.py".

Testing strategy:

Ensured that I could read the math equations with MathPlayer in NVDA on https://www.w3.org/Math/XSL/csmall2.xml
Before this pr, an exception was raised. With this pr, the math reads correctly.

Known issues with pull request:

None.

Change log entry:

None needed.

Section: New features, Changes, Bug fixes

Code Review Checklist:

This checklist is a reminder of things commonly forgotten in a new PR.
Authors, please do a self-review and confirm you have considered the following items.
Mark items you have considered by checking them.
You can do this when editing the Pull request description with an x: [ ] becomes [x].
You can also check the checkboxes after the PR is created.

  • Pull Request description is up to date.
  • Unit tests.
  • System (end to end) tests.
  • Manual tests.
  • User Documentation.
  • Change log entry.
  • Context sensitive help for GUI changes.

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 3243cb0f09

@feerrenrut feerrenrut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelDCurran michaelDCurran merged commit 37d66a5 into master Apr 20, 2021
@michaelDCurran michaelDCurran deleted the i12281 branch April 20, 2021 09:06
@nvaccessAuto nvaccessAuto added this to the 2021.1 milestone Apr 20, 2021
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

Successfully merging this pull request may close these issues.

ModuleNotFoundError: No module named 'comtypes.gen.MathPlayer' when import MathPlayer module

4 participants