-
-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Labels
Description
Hi,
Thank you very much for the library.
Sometime the function smpplib.gsm.make_parts can't split correctly the message in parts, exemple of sms :
"EMOTICON BUG 🤼 🏃 🏇 🏋 🏹 🛶 🤸 🤹 🛹 🥏 🎳 🏊 🏄 🤽 🎿 ⛸ ⛷ 🏂 🛷 🥌 🏌"
It's an unlikely case for my need, I left out the encoding management for this type of message.
But this creates another problem. With this kind of message the method read_once call by listen raise a PDUError.
And in this PDUError , there is not all the PDU information and especially the sequence.
def read_once(self, ignore_error_codes=None, auto_send_enquire_link=True):
"""Read a PDU and act"""
try:
try:
pdu = self.read_pdu()
except socket.timeout:
if not auto_send_enquire_link:
raise
self.logger.debug('Socket timeout, listening again')
pdu = smpp.make_pdu('enquire_link', client=self)
self.send_pdu(pdu)
return
if pdu.is_error():
raise exceptions.PDUError('({}) {}: {}'.format(
pdu.status,
pdu.command,
consts.DESCRIPTIONS.get(pdu.status, 'Unknown status')),
int(pdu.status),
)
It's possible to add the PDU object in the PDUError or just the sequence. I need the sequence to link the error to the messages I send.
Otherwise the message remains in an unknow status.
Best Regards.
Reactions are currently unavailable