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

Block=(0,0,16) is not support #46

Open
yzq opened this issue Nov 29, 2022 · 0 comments
Open

Block=(0,0,16) is not support #46

yzq opened this issue Nov 29, 2022 · 0 comments

Comments

@yzq
Copy link

yzq commented Nov 29, 2022

When block param is (0, 0, 16), like the following code,
response = client.get(path, block2=(0, 0, 16))
The error log is:
Traceback (most recent call last):
File "coapsrv.py", line 23, in
main()
File "coapsrv.py", line 16, in main
server.listen(10)
File "/usr/local/lib64/python3.6/site-packages/coapthon/server/coap.py", line 153, in listen
logger.info("receive_datagram - " + str(message))
File "/usr/local/lib64/python3.6/site-packages/coapthon/messages/message.py", line 734, in str
return self.line_print
File "/usr/local/lib64/python3.6/site-packages/coapthon/messages/message.py", line 719, in line_print
msg += "{name}: {value}, ".format(name=opt.name, value=utils.parse_blockwise(opt.value))
File "/usr/local/lib64/python3.6/site-packages/coapthon/utils.py", line 94, in parse_blockwise
num = value & 0xFFFFF0
TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'

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

1 participant