Comments (6)
Thanks for the report, we will look at it asap. I'm on holidays at the moment.
from python-messaging.
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.
Thanks for the quick responses!
I installed the latest code by doing:
sudo apt-get remove python-messaging
- (from /usr/local/src)
sudo git clone https://github.com/pmarti/python-messaging.git
cd python-messaging/
sudo python setup.py build
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.
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.
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.
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)
- decode multipart pdu message HOT 1
- Concatenating multi-part PDU HOT 3
- How send MMS from Modem Dongle USB?
- How get a MMS message? HOT 3
- Greek GSM chars to PDU example HOT 4
- sms.cnt and sms.seq HOT 4
- Multipart SMS with Huawei e220 HOT 3
- MMSEncoder has no attribute 'encode_boolean_value'
- installation instructions HOT 2
- utf-8' codec can't decode byte 0xff in position 0 HOT 1
- Solution to problems with Polish characters
- Issue in timestap HOT 1
- message with smiles HOT 6
- python-messaging Failed to handle HTTP request HOT 1
- sms.class = 0 invalid syntax
- MMSEncoder has no no Expiry Encoder HOT 2
- Cannot specify multiple recipients
- decode send .mms headers From Date error
- TypeError: super() argument 1 must be type, not classobj HOT 1
- How can to encode an MMS without smil and just img/txt dataparts?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-messaging.