Bug 11742 - Not able to open unmatched contacts window
: Not able to open unmatched contacts window
Status: UNCONFIRMED
Product: Hermes
General
: unspecified
: N900 Maemo
: Unspecified major (vote)
: ---
Assigned To: unassigned
: general
:
:
:
:
  Show dependency tree
 
Reported: 2011-01-04 19:15 UTC by Laurent Bigonville
Modified: 2011-02-12 21:26 UTC (History)
2 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Laurent Bigonville (reporter) 2011-01-04 19:15:05 UTC
SOFTWARE VERSION: 
Hermes 0.8.9
Maemo 5 (20.2010.36-2)

EXACT STEPS LEADING TO PROBLEM: 
(Explain in detail what you do (e.g. tap on OK) and what you see (e.g. message
Connection Failed appears))
1. Start sync with facebook account and wait until it finish
2. Click on the button to see the list of the unmatched contacts

EXPECTED OUTCOME: 

Window with unmatched contact open and be able to match contact manually

ACTUAL OUTCOME:

The window is not opened and I get a traceback:

Traceback (most recent call last):
  File "/opt/hermes/lib/org/maemo/hermes/gui/gtkui.py", line 189, in
show_contacts
    view = ContactView(contacts)
  File "/opt/hermes/lib/org/maemo/hermes/gui/contactview.py", line 55, in
__init__
    if pi and pi.contents.data.uri.startswith("image/"):
AttributeError: 'NoneType' object has no attribute 'startswith'

REPRODUCIBILITY: 
always

EXTRA SOFTWARE INSTALLED: 

OTHER COMMENTS:
Comment 1 Laurent Bigonville (reporter) 2011-01-04 19:41:04 UTC
Looking at the vcard

I've seen

PHOTO;ENCODING=B:ZmlsZTovLy9ob21lL3VzZXIvLm9zc28tYWJvb2svcGhvdG9zLzlTTzU0VQ==

$ echo "ZmlsZTovLy9ob21lL3VzZXIvLm9zc28tYWJvb2svcGhvdG9zLzlTTzU0VQ=="|base64 -d
file:///home/user/.osso-abook/photos/9SO54U

Looks weird
Comment 2 Andrew Flegg maemo.org 2011-02-12 21:26:46 UTC
From Daniel Siegel:

contactview.py:
 55             if pi and pi.contents.data.uri.startswith("image/"):

 61             elif pi and pi.contents.data.uri.startswith("file://"):

> however at least on some contacts of mine, where i put the photo myself,
> there isn't necessarily an uri attribute on that object. therefore it
> will crash with the following message: AttributeError: 'NoneType' object
> has no attribute 'startswith'. changing those two lines to

 55             if pi and pi.contents.data.uri and
pi.contents.data.uri.startswith("image/"):

 61             elif pi and pi.contents.data.uri and
pi.contents.data.uri.startswith("file://"):