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

Say all on Desktop raises an error #9947

Closed
LeonarddeR opened this issue Jul 17, 2019 · 4 comments · Fixed by #10723 or #11453
Closed

Say all on Desktop raises an error #9947

LeonarddeR opened this issue Jul 17, 2019 · 4 comments · Fixed by #10723 or #11453
Labels
bug/regression bug p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority quick fix
Milestone

Comments

@LeonarddeR
Copy link
Collaborator

Steps to reproduce:

  1. Focus the desktop.
  2. Invoke caret say all

Actual behavior:

The following error is raised:

ERROR - scriptHandler.executeScript (15:54:57.769):
error executing script: <bound method GlobalCommands.script_sayAll of <globalCommands.GlobalCommands object at 0x05875770>> with gesture 'NVDA+a'
Traceback (most recent call last):
  File "scriptHandler.pyc", line 190, in executeScript
  File "globalCommands.pyc", line 1334, in script_sayAll
  File "sayAllHandler.pyc", line 79, in readText
  File "sayAllHandler.pyc", line 119, in nextLine
AttributeError: '_TextReader' object has no attribute 'reader'
ERROR - stderr (15:54:57.779):
Exception ignored in:
ERROR - stderr (15:54:57.790):
<function _TextReader.__del__ at 0x0462F390>
ERROR - stderr (15:54:57.803):
Traceback (most recent call last):
ERROR - stderr (15:54:57.815):
  File "sayAllHandler.pyc", line 213, in __del__
ERROR - stderr (15:54:57.827):
  File "sayAllHandler.pyc", line 206, in stop
ERROR - stderr (15:54:57.839):
AttributeError
ERROR - stderr (15:54:57.851):
:
ERROR - stderr (15:54:57.863):
'_TextReader' object has no attribute 'reader'

Expected behavior:

NO error

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

threshold-18069

Windows version:

Windows 10 1903 build 18362.239

@LeonarddeR
Copy link
Collaborator Author

This is a one line fix.

if api.getCaretObject() fails, the reader should be set to None. Then, nextLine will automatically abort. Alternatively, we should raise the error and catch it where we call sayAllhandler, but that differs from the implementation in master.

@feerrenrut feerrenrut changed the title Threshold: Say all in non-text raises an error Say all on Desktop raises an error Feb 3, 2020
@feerrenrut feerrenrut added bug p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority quick fix bug/regression labels Feb 3, 2020
@nvaccessAuto nvaccessAuto added this to the 2020.3 milestone Jul 31, 2020
@lukaszgo1
Copy link
Contributor

Unfortunately it's not fixed for me with latest Alpha.
When pressing NVDA + down arrow on desktop error sound plays and the following is in the log:

ERROR - stderr (11:34:21.050) - MainThread (6084):
Exception ignored in:
ERROR - stderr (11:34:21.060) - MainThread (6084):
<function _TextReader.del at 0x033A4150>
ERROR - stderr (11:34:21.080) - MainThread (6084):
Traceback (most recent call last):
ERROR - stderr (11:34:21.100) - MainThread (6084):
File "sayAllHandler.pyc", line 252, in del
ERROR - stderr (11:34:21.120) - MainThread (6084):
File "sayAllHandler.pyc", line 245, in stop
ERROR - stderr (11:34:21.140) - MainThread (6084):
AttributeError
ERROR - stderr (11:34:21.160) - MainThread (6084):
:
ERROR - stderr (11:34:21.180) - MainThread (6084):
'_TextReader' object has no attribute 'reader'
@feerrenrut Could you please reopen?

lukaszgo1 added a commit to lukaszgo1/nvda that referenced this issue Aug 3, 2020
michaelDCurran added a commit that referenced this issue Aug 3, 2020
* Don't actibate Say All profile if there is nothing to read

Fixes #10899
Fixes #9947

* Update what's new

Co-authored-by: Michael Curran <mick@nvaccess.org>
@Mohamed00
Copy link

This issue seems to have been re-introduced when #14070 was merged. When performing a say all on the desktop, errors like this are raised.
DEBUGWARNING - speech.sayAll._SayAllHandler.readText (20:01:10.974) - MainThread (23052):
Unable to make reader
Traceback (most recent call last):
File "speech\sayAll.pyc", line 362, in getInitialTextInfo
File "documentBase.pyc", line 74, in makeTextInfo
File "textInfos\offsets.pyc", line 474, in init
File "textInfos\offsets.pyc", line 253, in _getCaretOffset
NotImplementedError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "speech\sayAll.pyc", line 110, in readText
File "speech\sayAll.pyc", line 192, in init
File "speech\sayAll.pyc", line 364, in getInitialTextInfo
NotImplementedError: ('Unable to make TextInfo: ', NotImplementedError())
ERROR - stderr (20:01:10.975) - MainThread (23052):
Exception ignored in:
ERROR - stderr (20:01:10.984) - MainThread (23052):
<function _TextReader.del at 0x03A7C0C0>
ERROR - stderr (20:01:10.994) - MainThread (23052):
Traceback (most recent call last):
ERROR - stderr (20:01:11.004) - MainThread (23052):
File "speech\sayAll.pyc", line 356, in del
ERROR - stderr (20:01:11.014) - MainThread (23052):
File "speech\sayAll.pyc", line 349, in stop
ERROR - stderr (20:01:11.024) - MainThread (23052):
AttributeError
ERROR - stderr (20:01:11.034) - MainThread (23052):
:
ERROR - stderr (20:01:11.043) - MainThread (23052):
'_CaretTextReader' object has no attribute 'reader'

@seanbudd
Copy link
Member

@Mohamed00 - can you please open a new issue? this issue is stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/regression bug p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority quick fix
Projects
None yet
6 participants