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: b'0101' issue in Python 3.5 #22

Open
vyassu opened this issue Apr 7, 2017 · 2 comments
Open

KeyError: b'0101' issue in Python 3.5 #22

vyassu opened this issue Apr 7, 2017 · 2 comments

Comments

@vyassu
Copy link

vyassu commented Apr 7, 2017

Hi

I am encountering below mentioned error after applying the fix for Issue #21.

nat_type, external_ip, external_port = stun.get_ip_info(stun_host=(stun_details[0]), stun_port=int(stun_details[1]))
File "C:\Users\User\AppData\Local\Programs\Python\Python35\lib\site-packages\stun_init_.py", line 253, in get_ip_info
stun_host=stun_host, stun_port=stun_port)
File "C:\Users\User\AppData\Local\Programs\Python\Python35\lib\site-packages\stun_init_.py", line 191, in get_nat_type
ret = stun_test(s, stun_host, port, source_ip, source_port)
File "C:\Users\User\AppData\Local\Programs\Python\Python35\lib\site-packages\stun_init_.py", line 136, in stun_test
bind_resp_msg = dictValToMsgType[msgtype] == "BindResponseMsg"
KeyError: b'0101'

@aarant
Copy link

aarant commented Feb 22, 2018

Since the pull requests fixing this project for Python 3 have been open for a long time, I decided to make my own version of this project. It may be useful to you: https://github.com/arantonitis/pynat

@PopMini
Copy link

PopMini commented Apr 9, 2024

Fixed bug:

bind_resp_msg = dictValToMsgType[msgtype.decode()] == "BindResponseMsg"

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

3 participants