Giter Club home page Giter Club logo

Comments (6)

pmarti avatar pmarti commented on July 20, 2024

Thanks for the report, we will look at it asap. I'm on holidays at the moment.

from python-messaging.

andrewbird avatar andrewbird commented on July 20, 2024

Hi amilkh,
Thanks for the bug report. I just pushed a little fix for this to the git repo. Please let me know if it fixes it for you?

Regards,

Andrew

from python-messaging.

amilkh avatar amilkh commented on July 20, 2024

Thanks for the quick responses!
I installed the latest code by doing:

  1. sudo apt-get remove python-messaging
  2. (from /usr/local/src) sudo git clone https://github.com/pmarti/python-messaging.git
  3. cd python-messaging/
  4. sudo python setup.py build
  5. sudo python setup.py install

However, I got the same error:

amil@amil-ubuntu:~$ python
Python 2.7.3 (default, Apr 20 2012, 22:39:59) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import timedelta
>>> from messaging.sms import SmsSubmit
>>> 
>>> sms = SmsSubmit("+44123231231", "this SMS will auto-destroy in 5 hours")
>>> sms.validity = timedelta(hours=5)
>>> pdu = sms.to_pdu()[0]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/python_messaging-0.5.12-py2.7.egg/messaging/sms/submit.py", line 83, in to_pdu
    sms_msg_pdu = self._get_msg_pdu()
  File "/usr/local/lib/python2.7/dist-packages/python_messaging-0.5.12-py2.7.egg/messaging/sms/submit.py", line 235, in _get_msg_pdu
    msgvp_pdu = encode_str(chr(msgvp))
TypeError: integer argument expected, got float
>>> 
>>> print pdu.length, pdu.pdu

Any ideas?
Also, how do I uninstall old version of python-messaging if I installed it using setup.py?

PS: I am using the 64-bit version of Ubuntu 12.04 LTS.

from python-messaging.

andrewbird avatar andrewbird commented on July 20, 2024

Hi,
Well stackoverflow has this thread http://stackoverflow.com/questions/1550226/python-setup-py-uninstall , but I can't say I've tried any of them as I normally use packages. It's odd that the setup doesn't just overwrite the files that changed. Do you see the latest commit if you do 'git log'? If not, do 'git checkout -f master ; git fetch --all ; git pull'

Andrew

from python-messaging.

amilkh avatar amilkh commented on July 20, 2024

I do think that it updated correctly because I have version 0.5.12 as the
log I postes shows.

I'll let you know what git log says when I get on my computer.

from python-messaging.

amilkh avatar amilkh commented on July 20, 2024

Sorry, I had actually not gotten the latest commit. I re-cloned the repository to a new directory and built it.
It works now!
Thank you very much for the quick help and for writing this library.

amil@amil-ubuntu:~$ python
Python 2.7.3 (default, Apr 20 2012, 22:39:59) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import timedelta
>>> from messaging.sms import SmsSubmit
>>> 
>>> sms = SmsSubmit("+44123231231", "this SMS will auto-destroy in 5 hours")
>>> sms.validity = timedelta(hours=5)
>>> pdu = sms.to_pdu()[0]
>>> 
>>> print pdu.length, pdu.pdu
47 0011000B914421231332F100003B2574747A0E9A36A7A07B9ACD0685EBF4778B5C9ED3E5EF3C28ED06D540E8775D3E07
>>> 

from python-messaging.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.