Conversation
…omtypes) come through NVDA's logger with no codepath. (#14317) Partial fix for #14315 Summary of the issue: If an exception is raised inside a comtypes event handler and is not caught, Many many log messages are logged by NVDA at level error, with each line of the multiple nested tracebacks being individually logged via standard error. This is extremely noisy for the user, and the log output is very hard to read. Some background: To produce friendly module.class.function paths for NVDA's log messages, NVDA's logging code provides / generates a special 'codepath' attribute on its log erecords. However, as NVDA sets itself as the root logger, it also receives log messages from other libraries (E.g. comtypes). But these log messages don't come with the special 'codepath' record attribute, which is required by NVDA's log formatter. Thus, if one of these log messages is produced, an internal logging error occurs (KeyError: codepath), and this is pushed out via standard error as the log message could not be written to the log. However, NVDA's redirects standard error back to the logger, logging each line of output as its own log message. In this case then, What is logged is each separate line of the multiple nested tracebacks, including the actual exception in the comtypes UI Autpomation event handler, plus the logging error traceback itself, plus also a call stack for debugging. In totally on average about 22 or so separate log messages for one error. Description of user facing changes If an error occurs in a comtypes event handler method, only one error will be written to the log rather than more than 20. Description of development approach Add code to NVDA's log formatter.format method which checks if the record does not contain a codepath attribute, and if so, produces a simple one from standard log record attributes. e.g. name and funcName. After this change, raising Runtime error in the UI Automation handleAutomationEvent method produces just 1 much shorter and easier to read message.
Summary of the issue: #14301 moved an api import from core.main as it was otherwise unused #14050 introduced a usage of api to core.main to beta This means that api was used without being imported on beta and master. Description of user facing changes None Description of development approach Fix import error
From translation svn revision: 70427 Authors: Bernd Dorer <bdorer@mailbox.org> David Parduhn <xkill85@gmx.net> Rene Linke <rene.linke@hamburg.de> Adriani Botez <adriani.botez@gmail.com> Karl Eick <hozosch@web.de> Robert Hänggi <aarjay.robert@gmail.com> Astrid Waldschmetterling <a.r.waldschmetterling@gmx.de> Stats: 2 2 source/locale/de/LC_MESSAGES/nvda.po 1 file changed, 2 insertions(+), 2 deletions(-)
From translation svn revision: 70427 Authors: Ali Aslani <aslani.ali@gmail.com> Mohammadreza Rashad <mohammadreza5712@gmail.com> Stats: 280 137 source/locale/fa/LC_MESSAGES/nvda.po 96 0 user_docs/fa/changes.t2t 2 files changed, 376 insertions(+), 137 deletions(-)
From translation svn revision: 70427 Authors: Hrvoje Katic <hrvojekatic@gmail.com> Zvonimir Stanecic <9a5dsz@gozaltech.org> Milo Ivir <mivir@milotype.de> Dejana Rakic <dejana.rakic.2@gmail.com> Stats: 5 5 source/locale/hr/LC_MESSAGES/nvda.po 1 file changed, 5 insertions(+), 5 deletions(-)
From translation svn revision: 70427 Authors: Simone Dal Maso <simone.dalmaso@gmail.com> Alberto Buffolino <a.buffolino@gmail.com> Stats: 95 97 user_docs/it/userGuide.t2t 1 file changed, 95 insertions(+), 97 deletions(-)
From translation svn revision: 70427 Authors: Takuya Nishimoto <nishimotz@gmail.com> Minako Nonogaki <minakonono3519@gmail.com> Stats: 269 41 user_docs/ja/userGuide.t2t 1 file changed, 269 insertions(+), 41 deletions(-)
From translation svn revision: 70427 Authors: Bram Duvigneau <bram@bramd.nl> Bart Simons <bart@bartsimons.be> A Campen <a.campen@wxs.nl> Leonard de Ruijter <alderuijter@gmail.com> Stats: 269 41 user_docs/nl/userGuide.t2t 1 file changed, 269 insertions(+), 41 deletions(-)
From translation svn revision: 70427 Authors: Grzegorz Zlotowicz <grzezlo@wp.pl> Patryk Faliszewski <patric3031@wp.pl> Zvonimir Stanecic <9a5dsz@gozaltech.org> Dorota Krac <dorkakrac@yandex.com> Piotr Rakowski <kontakt@piotrrakowski.net> Hubert Meyer <hubmeyer1989@gmail.com> Arkadiusz Swietnicki <nuno69a@gmail.com> Stats: 110 0 user_docs/pl/changes.t2t 1 file changed, 110 insertions(+)
From translation svn revision: 70427 Authors: Cagri Dogan <cagrid@hotmail.com> Stats: 11 11 source/locale/tr/LC_MESSAGES/nvda.po 62 9 user_docs/tr/changes.t2t 2 files changed, 73 insertions(+), 20 deletions(-)
From translation svn revision: 70427
feerrenrut
approved these changes
Nov 4, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Must be merge commit not squash merge