|
2010-05-18
, 09:42
|
Posts: 16 |
Thanked: 1 time |
Joined on Jan 2010
|
#32
|
|
2010-05-18
, 09:44
|
Posts: 16 |
Thanked: 1 time |
Joined on Jan 2010
|
#33
|
|
2010-05-18
, 09:48
|
|
Posts: 288 |
Thanked: 113 times |
Joined on Dec 2009
@ Germany
|
#34
|
I've just discovered an interesting thing: if you send an email to someone you don't have in your personal address book, the N900 standard email client will add the email address to the address book.: your address book will show something like xxx@yyy.com. If you open the contact you will see that only an email address is present (no name, surname or alias present)
If you try to create an email contact directly from your address book, it will ask you to put a name at least...this means is impossible to add only an email address...
Let's go back to our program: If the email address is present in my address book, the program doesn't work and it shows me this error:
Traceback (most recent call last):
File "/opt/www2sms/www2sms.py", line 451, in <module>
ui = MainWindow()
File "/opt/www2sms/www2sms.py", line 55, in __init__
self.my_phone_book = self.get_contacts()
File "/opt/www2sms/www2sms.py", line 200, in get_contacts
contact_and_numbers = [item.decode('utf-8')]
AttributeError: 'list' object has no attribute 'decode'
If I delete this email contact, the program works fine!
Just one thing: now the problem seems to appear only with the previous version (the one installed through the app. manager). The new one gave me this problem only once!
for econtact in contacts: contact = [econtact.get_property(name_attributes[2]), econtact.get_property(name_attributes[1]), econtact.get_property(name_attributes[3])] if contact[0] and contact[1]: item = "%s, %s" %(contact[0], contact[1]) elif contact[0] and not contact[1]: item = "%s" %(contact[0]) elif not contact[0] and contact[1]: item = "%s" %(contact[1]) elif not contact[0] and not contact[1] and contact[2]: item = "%s" %(contact[2]) else: item = ["No name available"] # Everything is stored in UTF-8 so we decode it for the QT-GUI contact_and_numbers = [item.decode('utf-8')]
|
2010-05-18
, 09:52
|
|
Posts: 288 |
Thanked: 113 times |
Joined on Dec 2009
@ Germany
|
#35
|
@MaRRo81
okay, cool. That worked. I could install www2sms. Quite useful such a forum ;-)
Now, www2sms has been installed but as soon as i click on the "www2sms" icon, nothing really happens. In the top panel "www2sms" can be read and a "busy"-Icon is next to that. After a second or two, it seems to crash without any hint.
regards,
nexus
|
2010-05-18
, 09:52
|
Posts: 81 |
Thanked: 10 times |
Joined on May 2010
@ Germany
|
#36
|
|
2010-05-18
, 09:55
|
Posts: 190 |
Thanked: 129 times |
Joined on Mar 2010
@ Bavaria, Germany
|
#37
|
There is, as far as I investigated, no pythonic way to insert send SMS into conversations, so I would have to mess around with ctypes for python or somehow play around with D-Bus...
The Following User Says Thank You to gri For This Useful Post: | ||
|
2010-05-18
, 09:55
|
|
Posts: 288 |
Thanked: 113 times |
Joined on Dec 2009
@ Germany
|
#38
|
|
2010-05-18
, 09:56
|
Posts: 60 |
Thanked: 19 times |
Joined on Nov 2009
|
#40
|
okay, cool. That worked. I could install www2sms. Quite useful such a forum ;-)
Now, www2sms has been installed but as soon as i click on the "www2sms" icon, nothing really happens. In the top panel "www2sms" can be read and a "busy"-Icon is next to that. After a second or two, it seems to crash without any hint.
regards,
nexus