Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError while trying to encode PDU #19

Closed
prem-narain opened this issue May 23, 2016 · 2 comments
Closed

KeyError while trying to encode PDU #19

prem-narain opened this issue May 23, 2016 · 2 comments

Comments

@prem-narain
Copy link

When i am trying to encode a PDU there's a KeyError

import binascii
import StringIO
from smpp.pdu.pdu_encoding import PDUEncoder

hex = '0000004d00000005000000009f88f12441575342440001013136353035353531323334000101313737333535353430373'
'000000000000000000300117468657265206973206e6f2073706f6f6e'
binary = binascii.a2b_hex(hex)
file = StringIO.StringIO(binary)
pdu = PDUEncoder().decode(file)
print("PDU: %s" % pdu)

This has the following traceback
File "Test.py", line 3, in
from smpp.pdu.pdu_encoding import PDUEncoder
File "/home/prem/smpp.pdu/smpp/pdu/pdu_encoding.py", line 18, in
from smpp.pdu import constants,pdu_types,operations
File "/home/prem/smpp.pdu/smpp/pdu/pdu_types.py", line 20, in
CommandId = Enum(*constants.command_id_name_map.keys())
TypeError: call() takes at most 6 arguments (28 given)

@prem-narain
Copy link
Author

I found the Answer of this error ,That was coming because enum module did not install properly into my system using ... sudo python setup.py install ...So first i did install enum module and now its working fine .
Thanks a lot

@theduderog
Copy link
Contributor

Cool. Glad you got it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants