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

NoResponse stopped working #109

Closed
chrysn opened this issue Mar 9, 2018 · 1 comment
Closed

NoResponse stopped working #109

chrysn opened this issue Mar 9, 2018 · 1 comment
Assignees

Comments

@chrysn
Copy link
Owner

chrysn commented Mar 9, 2018

This needs to be

  • understood w/rt its implications for PlumbingRequest,
  • fixed, and
  • tested.
@chrysn chrysn added this to the new-transports-cleanup milestone Mar 9, 2018
@chrysn chrysn self-assigned this Mar 9, 2018
@therealprof
Copy link

I was just running into this while trying to send an EMPTY response. I get back an message saying:
WARNING:coap-server:Response does not carry response code (<Code 0 "EMPTY">), application probably violates protocol.

https://tools.ietf.org/html/rfc7252#section-5.2.2 clearly states that sending an EMPTY ACK is valid behaviour so I was looking into the code and found NoResponse and tried to use that instead which gave me this:

ERROR:coap-server:An exception occurred while rendering a resource: AttributeError("'Sentinel' object has no attribute 'code'")
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiocoap-0.4a1.post0-py3.7.egg/aiocoap/protocol.py", line 348, in _render_to_plumbing_request
    cancellation_future)
  File "/usr/local/lib/python3.7/site-packages/aiocoap-0.4a1.post0-py3.7.egg/aiocoap/protocol.py", line 465, in _render_to_plumbing_request_inner
    response = await self.serversite.render(request)
  File "/usr/local/lib/python3.7/site-packages/aiocoap-0.4a1.post0-py3.7.egg/aiocoap/resource.py", line 321, in render
    return await child.render(subrequest)
  File "/usr/local/lib/python3.7/site-packages/aiocoap-0.4a1.post0-py3.7.egg/aiocoap/resource.py", line 111, in render
    if response.code is None:
AttributeError: 'Sentinel' object has no attribute 'code'

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