[nvda] Re: NVDA 630 - small bugs

Hi Mick,
To me it seems quite obvious that in the case when echo of key command is on other object than string is passed. In the keyboard_handler in speakKey keylist has assigned a value this way:
                        keyList=[]
And It looks as if it is not converted to string before processing it in speech.py. At first I tryed to convert it into unicode but then all braces and commas were spoken on each command key press so I decided to check whether we are really going to replace non-breaking space within the string just in case there might be other such cases with different objects.

Michael Curran  wrote:
Hi Petere,

The patch looks good, I've just committed it.

I still can't work out why processTextSymbols would actually receive something other than a string or None... but oh well, it works for now.

Mick

----- Original Message ----- From: "Peter Vágner" <peter.v@xxxxxxxxxxx>
To: <nvda@xxxxxxxxxxxxx>
Sent: Saturday, May 05, 2007 7:04 AM
Subject: [nvda] Re: NVDA 630 - small bugs


Hello again,
Mick is trying to solve it in R628:
Only convert non-breaking spaces in processSymbol if we know the symbol is really a string. Sometimes it can be None, example: end of a line in outlook
express edit fields.

but I cant really see the condition there so I am attaching a patch to
fix in this email. works fine here hopefully I am not breaking some
other thing.
What I am doing is that I am just checking if the object where replacing
is being done is really a string because others might not have replace
method as sayd in the exception.

Peter


Peter Vágner  wrote:
Hello,
the bug with command keys echo turned on exists since hard spaces
conversion to simple spaces has been committed. We do need to ensure
that we are doing this conversion on the unicode strings.
One workaround for this would be to convert keylist of type list in the
call:             speech.speakMessage(keyList)
to unicode string. but then all the punctuation delimiting and enclosing
the keys is spoken so it has to be filtered out. or we shal exclude
lists from this replacement completelly.
let's wait for a more proper solution by any of the core developers.


Peter


Robjoy  wrote:
Hello all,
For me NVDA R630 works fine except for a few small bugs, both on an
english and on a hungarian windows xp proSp2.
The first one happened when i switched from the espeak driver to the
espeak driver. Yeah it sounds stupid, but i thought its on the sapi
version of espeak, so i quickly changed it to the same driver without
noticing that it was on the espeak driver . Here is the error message:
Exception in thread Thread-1:
Traceback (most recent call last):
  File "threading.pyc", line 460, in __bootstrap
  File ".\synthDrivers\_espeak.py", line 128, in run
UnboundLocalError: local variable 'espeakDLL' referenced before
assignment

The second one happens when the speak command keys feature is on. Here
is the exception info:
Exception 2007-05-04 21:31:48.062000
function from queue 0: ----
Traceback (most recent call last):
  File "queueHandler.pyc", line 54, in pumpAll
  File "keyboardHandler.pyc", line 137, in speakKey
  File "speech.pyc", line 160, in speakMessage
  File "speech.pyc", line 128, in processText
  File "speech.pyc", line 48, in processTextSymbols
AttributeError: 'list' object has no attribute 'replace'

Hope this helps.
Regards,
Rob



---
Lighttech Interactive
http://www.lighttechinteractive.com


To post messages to the list send email to
nvda@xxxxxxxxxxxxx
To modify your NVDA Email settings go to:
http://www.freelists.org/list/nvda
Thank you for your continued support of Nonvisual Desktop Access, an
open source free screen reader for Microsoft Windows:
http://www.nvda-project.org/
Report bugs or make feature requests at:
http://trac.nvda-project.org/
Message Archive:
http://www.freelists.org/archives/nvda


To post messages to the list send email to
nvda@xxxxxxxxxxxxx
To modify your NVDA Email settings go to:
http://www.freelists.org/list/nvda
Thank you for your continued support of Nonvisual Desktop Access, an
open source free screen reader for Microsoft Windows:
http://www.nvda-project.org/
Report bugs or make feature requests at:
http://trac.nvda-project.org/
Message Archive:
http://www.freelists.org/archives/nvda





--------------------------------------------------------------------------------


Index: source/speech.py
===================================================================
--- source/speech.py (revision 637)
+++ source/speech.py (working copy)
@@ -45,7 +45,8 @@
if (text is None) or (len(text)==0) or (isinstance(text,basestring) and (set(text)<=set(characterSymbols.blankList))):
 return _("blank")
 #Convert non-breaking spaces to spaces
- text=text.replace(u'\xa0',u' ')
+ if isinstance(text,basestring):
+ text=text.replace(u'\xa0',u' ')
 #Limit groups of the same character to 5 or less.
 trunkatedText=""
 lastChar=""


To post messages to the list send email to
nvda@xxxxxxxxxxxxx
To modify your NVDA Email settings go to:
http://www.freelists.org/list/nvda
Thank you for your continued support of Nonvisual Desktop Access, an open source free screen reader for Microsoft Windows:
http://www.nvda-project.org/
Report bugs or make feature requests at:
http://trac.nvda-project.org/
Message Archive:
http://www.freelists.org/archives/nvda


To post messages to the list send email to
nvda@xxxxxxxxxxxxx
To modify your NVDA Email settings go to:
http://www.freelists.org/list/nvda
Thank you for your continued support of Nonvisual Desktop Access, an open 
source free screen reader for Microsoft Windows:
http://www.nvda-project.org/
Report bugs or make feature requests at:
http://trac.nvda-project.org/
Message Archive:
http://www.freelists.org/archives/nvda

Other related posts: