View Single Post
Posts: 267 | Thanked: 183 times | Joined on Jan 2010 @ Campinas, SP, Brazil
#117
Mine doesn't work, and the running espeakcaller-daemon.py spits this error message when a call from my fixed telephone line arrives:

[oce]Phonebook vcard: BEGIN:VCARD
VERSION:3.0
REV:2010-04-08T15:05:26Z
UID:126
TEL;TYPE=HOME,VOICE:01932890644
X-JABBER;TYPE="google-talk";X-OSSO-VALID=yesatola@gmail.com
NICKNAME:Cláudio Sampaio
TEL;TYPE=CELL:01991163949
END:VCARD
ERROR:dbus.connection:Exception in handler for D-Bus signal:
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.5/dbus/connection.py", line 214, in maybe_handle_message
self._handler(*args, **kwargs)
File "/opt/espeakcaller/espeakcaller-daemon.py", line 109, in handle_call
CallerNames = get_name_from_number(callernumber)
File "/opt/espeakcaller/espeakcaller-daemon.py", line 75, in get_name_from_number
print "Found name: " + fname
TypeError: cannot concatenate 'str' and 'NoneType' objects
[/code]

It seems it gets a null string and when trying to print, gives an error. So I change line 75 on /opt/espeakcaller/espeakcaller-daemon.py that is:

Code:
                    print "Found name: " + fname
to:

Code:
                    print "Phonebook vcard: " + "\n".join(vcardlist)
                    if fname is None:
                      print "Name is NULL."
                    else:
                      print "Found name: " + fname
...and it worked. Please consider this a bug report and a patch
__________________
My nickname on freenode is ptl, that is, the consonants of my nickname here. Kind of a long story.
 

The Following User Says Thank You to Patola For This Useful Post: