maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [ANNOUNCE] www2sms - Send SMS via your providers website (https://talk.maemo.org/showthread.php?t=52754)

nexus101 2010-05-18 09:41

Re: [ANNOUNCE] www2sms - Send SMS via your providers website
 
@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

MaRRo81 2010-05-18 09:42

Re: [ANNOUNCE] www2sms - Send SMS via your providers website
 
Thank to you for the nice application..I'm gonna try to add the support for an italian sms web provider!

Ciao!

MaRRo81 2010-05-18 09:44

Re: [ANNOUNCE] www2sms - Send SMS via your providers website
 
@nexus101: mhh try to launch it from comman line:

python /opt/www2sms(version)/www2sms.py

and have a look at the error: try to see if it is the same error that I had (look at the first posts of this thread)

blubbi 2010-05-18 09:48

Re: [ANNOUNCE] www2sms - Send SMS via your providers website
 
Quote:

Originally Posted by MaRRo81 (Post 663731)
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!

Aha, maybe you should file a Bug about this... Adding contacts without names automatically... but disallow the same if you add a contact manually.

Okay, the new one (v1.0.1) should no longer stumble upon this cause it was just a left over that I added "item" for this special case as a list instead of a string.

The part of the code where this happend:
v1.0.0
Code:

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')]

So it was just to change from:
item = ["No name available"]
to
item = "No name available"

Thanks for the testing!

blubbi 2010-05-18 09:52

Re: [ANNOUNCE] www2sms - Send SMS via your providers website
 
Quote:

Originally Posted by nexus101 (Post 663771)
@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

I guess you triggered the "Empty name bug"

I'll push v1.0.1 devel repository since we found the bug and I could eliminate it.

Expect v1.0.1 or v1.0.2 in the DEVEL-Repo tonight.

So we do not have any longer to worry about that stupid bug I introduced.

nexus101 2010-05-18 09:52

Re: [ANNOUNCE] www2sms - Send SMS via your providers website
 
ok, then I see an error message, but not the same as yours:

"File "www2sms.py" line 26, in <module>
import os, errno, pwd, sys, math, sqlite3, time, calendar, evolution, re
ImportError: No module named evolution"

It seems that python-evolution package is missing?

nexus

gri 2010-05-18 09:55

Re: [ANNOUNCE] www2sms - Send SMS via your providers website
 
Quote:

Originally Posted by blubbi (Post 663181)
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...

Even if I stay in a sort of "competition" with www2sms because I created the Web2SMS project, I hope I can help you there.

Take a look at this post, I think the code should work to insert sms into conversations. (due the help of frals)

blubbi 2010-05-18 09:55

Re: [ANNOUNCE] www2sms - Send SMS via your providers website
 
Yes, but it depends on it... how could the package manager install it without python-evolution?

Oh... damn... another BUG... python-evolution is missing in my dependencies...

Depends: python (>= 2.5), python2.5-qt4-gui (>= 4.6.2-maemo20091218.0), python-mechanize (>= 0.1.11-1.1maemo1), pymaemo-optify, libsqlite3-0


*grml*

I'll fix it. It's in the DEVEL repo by tonight.

Thanks again.
Bjoern

NokiaRocks 2010-05-18 09:56

Re: [ANNOUNCE] www2sms - Send SMS via your providers website
 
Quote:

Originally Posted by blubbi (Post 663754)
You must know if it is free for you to send SMS via your providers Website (if your provider is supported yet)

Kind regards
Bjoern

Using O2 (klarmobil).

maemomatic 2010-05-18 09:56

Re: [ANNOUNCE] www2sms - Send SMS via your providers website
 
Hi, perhaps this is slightly OT, but I was wondering whether such an app could be used to send sms via commercial providers such as Vyke (http://www.vyke.com).

Vyke makes an app for Symbian phones allowing users to send sms through its servers directly from the normal sms interface on their mobile. They never released a version for N900, so in order to use it I now need to use their website on MicroB.


All times are GMT. The time now is 18:40.

vBulletin® Version 3.8.8