New issue 28 by nou...@googlemail.com: No Protocol is set on GTalk IM
http://code.google.com/p/goobook/issues/detail?id=28
What steps will reproduce the problem?
1. Add a GoogleTalk instant messaging nick to a contact
2. Delete cache rm ~/.goobook_cache
3. Perform a query "goobook query XY"
What is the expected output? What do you see instead?
Traceback (most recent call last):
File "/usr/bin/goobook-2.7", line 9, in <module>
load_entry_point('goobook==1.4alpha4', 'console_scripts', 'goobook')()
File "/usr/lib/python2.7/site-packages/goobook/application.py", line 83,
in main
args.func(config, args)
File "/usr/lib/python2.7/site-packages/goobook/application.py", line 111,
in do_query
goobk = GooBook(config)
File "/usr/lib/python2.7/site-packages/goobook/goobook.py", line 59, in
__init__
self.cache.load()
File "/usr/lib/python2.7/site-packages/goobook/goobook.py", line 242, in
load
self.update()
File "/usr/lib/python2.7/site-packages/goobook/goobook.py", line 249, in
update
self.contacts = list(self._parse_contacts(gc.fetch_contacts()))
File "/usr/lib/python2.7/site-packages/goobook/goobook.py", line 322, in
_parse_contacts
yield self._parse_contact(entry)
File "/usr/lib/python2.7/site-packages/goobook/goobook.py", line 306, in
_parse_contact
contact.im.append((ent.get('address'),
ent.get('protocol').split('#')[-1]))
AttributeError: 'NoneType' object has no attribute 'split'
What version of the product are you using? On what operating system?
goobook 1.4_alpha4 on gentoo with google.de
Please provide any additional information below.
$ diff goobook.py.orig goobook.py
306c306,307
< contact.im.append((ent.get('address'),
ent.get('protocol').split('#')[-1]))
---
> protocol = "GTALK" if (ent.get('protocol') == None) else
> ent.get('protocol').split('#')[-1]
> contact.im.append((ent.get('address'), protocol)
Attachments:
screenshot.png 132 KB
same issue here