python-messaging icon indicating copy to clipboard operation
python-messaging copied to clipboard

The output of encode_pdu can not be used in decode_pdu

Open pmarti opened this issue 14 years ago • 4 comments

decode_pdu fails with

ord() expected a character, but string of length 0 found

I think is just one bit that's missing and we should not read it

pmarti avatar Jun 09 '10 14:06 pmarti

Added a ValueError exception in c67f4080cd364f63dc89493497e0f62ed752c367 while we come up with a fix

pmarti avatar Jun 10 '10 08:06 pmarti

Is this still current? I see neither a decode_pdu not encode_pdu in the latest version?

Incidentally, how in the latest version can the PDU(s) generated by SmsSubmit be decoded again?

SteveAyre avatar May 09 '13 11:05 SteveAyre

Steve, It looks like it referred to the code before it was refactored into separate submit and deliver objects. For testing it would be nice to be able to decode the submit pdus we produce ourselves, but unless we aim python-messaging to be run on an smsc there's probably not a lot of practical use in implementing it. Unless you have any other thoughts?

Andrew

andrewbird avatar May 09 '13 12:05 andrewbird

For my purposes I'm looking at a system that allows the user to enter a message to be sent as either text or a PDU. It could be useful to decode the PDU to update the database system with the details of the message that was sent. It is an optional feature though, mostly cosmetic.

And sorry for hijacking the other issue - if it refers to old code I suggest we close it.

SteveAyre avatar May 09 '13 12:05 SteveAyre